Database error in vBulletin 4.1.10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jrh369
    New Member
    • Mar 2010
    • 13
    • 4.0.0

    Database error in vBulletin 4.1.10

    After upgrading from 4.1.5 to 4.1.10 I started experiencing a database error whenever I try to view a forum with (0 posts) or a forum with only a sub-forum and no posts in the parent forum.
    I ran the diagnostics for suspect files and it found some so I did a fresh install and ran the update again but am still receiving the database error below.
    Any help or suggestions would be greatly appreciated.


    Code:
    Database error in vBulletin 4.1.10:
    
    
    Invalid SQL:
    
    
            SELECT 
                IF(votenum >= 1, votenum, 0) AS votenum,
                IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
             thread.threadid,
                thread.lastpost, thread.lastposter, thread.lastposterid, thread.lastpostid, thread.replycount, IF(thread.views<=thread.replycount, thread.replycount+1, thread.views) AS views
                
            FROM vb_thread AS thread
            
            
            WHERE forumid = 2
                AND sticky = 0
                
                 AND visible IN (0,1,2)
                
                
                
                
            ORDER BY sticky DESC, 0 
            LIMIT 0, 20;
    
    
    MySQL Error   : Unknown column '0' in 'order clause'
    Error Number  : 1054
    Request Date  : Tuesday, January 17th 2012 @ 04:04:47 AM
    Error Date    : Tuesday, January 17th 2012 @ 04:04:47 AM
    Username      : Administrator
    Classname     : vB_Database
    MySQL Version : 5.0.92-community-log
    Last edited by jrh369; Tue 17 Jan '12, 4:58am.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74172

    #2
    Please disable all your addons, does the issue still happen?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • jrh369
      New Member
      • Mar 2010
      • 13
      • 4.0.0

      #3
      Yes. I added the disbable hooks line to the config.php before I ran the upgrade.php script the 2nd time.
      I only have 1 addon which is the "Instant Email Notification" mod.
      I"ve disabled this addon manually and tested again but still receive the same database error.

      Thanks

      Comment

      • jrh369
        New Member
        • Mar 2010
        • 13
        • 4.0.0

        #4
        Is there anyway to turn on logging to try and get a better idea what is causing this error?

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74172

          #5
          There are various logging options in both vBulletin and MySQL. However I don't think they will help. Both only log issues, not the cause of issues. I suggest opening a support ticket with access to your server.

          Query really looks like an addon though.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • jrh369
            New Member
            • Mar 2010
            • 13
            • 4.0.0

            #6
            The solution to this issue was to go into the admin control panel and open the forum which had the error and make a change and save it to force the bitfields to rebuild.
            This has something to do with the datastore and the update not properly processing forums with no messages.
            Our site has a couple hundred forums which may also have be a contributing factor.

            Thanks Lynne for working out the solution.

            Comment

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