Announcement

Collapse
No announcement yet.

Database error: Unknown column 'canview'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Database error: Unknown column 'canview'

    Just upgraded a 3.5 install to 4.0.2... went through every single patch update, so I'm not sure what's going on here.

    Code:
    Database error in vBulletin 4.0.2:
    
    Invalid SQL:
    
            SELECT 
                IF(votenum >= 1, votenum, 0) AS votenum,
                IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
             post.pagetext AS preview,
                thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, postusername, postuserid, thread.iconid AS threadiconid,
                thread.dateline, notes, thread.visible, sticky, votetotal, thread.attach, thread.lastpost, thread.lastposter, thread.lastposterid, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views,
                thread.prefixid, thread.taglist, hiddencount, deletedcount,
                user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend
                , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
                , deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
                
                , threadredirect.expires
                
            FROM thread AS thread
                LEFT JOIN user AS user ON (user.userid = thread.lastposterid)
                LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 1)
                LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
                 LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
                
                LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
                
                LEFT JOIN threadredirect AS threadredirect ON(thread.open = 10 AND thread.threadid = threadredirect.threadid)
                
            WHERE thread.threadid IN (0,401,389,385,369,367,365,363,361,359,357,355,353,351,349,347,345,343,341) 
            ORDER BY sticky DESC, lastpost DESC;
    
    MySQL Error   : Unknown column 'canview' in 'on clause'
    Error Number  : 1054
    Request Date  : Tuesday, February 23rd 2010 @ 02:55:03 PM
    Error Date    : Tuesday, February 23rd 2010 @ 02:55:03 PM
    Script        : http://portal.igreat.com/forumdisplay.php?29-Downloads-from-the-Users-Meeting
    Referrer      : 
    IP Address    : 71.240.123.178
    Username      : admin
    Classname     : vB_Database
    MySQL Version : 5.0.45
    Help would be appreciated!

  • #2
    Check your database and see if the subscribethread table has a field called canview

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment


    • #3
      It does not. Should I add one? As a tinyint? Default to anything?

      Comment


      • #4
        From the mysql-schema.php file for 4.0.2:
        Code:
            canview SMALLINT UNSIGNED NOT NULL DEFAULT '1',

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X