Announcement

Collapse
No announcement yet.

Invalid SQL

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

  • [Forum] Invalid SQL

    All of a sudden about an hour ago I started getting emails to my admin account stating there are some sql errors. Example below. I haven' changed anything in days and quite a few of the my pages appear to have "gone", blog, content, gallery etc. Forum and posts appear to be still there.

    Any ideas anyone?


    Database error in vBulletin 4.1.1:

    Invalid SQL:

    SELECT tagcontent.tagid, tag.tagtext, COUNT(*) AS searchcount
    FROM tagcontent AS tagcontent
    INNER JOIN tag AS tag ON (tagcontent.tagid = tag.tagid)
    INNER JOIN blog AS blog ON (tagcontent.contenttypeid = AND tagcontent.contentid = blog.blogid)
    INNER JOIN blog_user AS blog_user ON (blog.userid = blog_user.bloguserid)

    WHERE blog.dateline <= 1301422466 AND blog.pending = 0 AND blog.state = 'visible' AND ~blog.options & 8
    AND tagcontent.dateline > 1269886466
    GROUP BY tagcontent.tagid, tag.tagtext
    ORDER BY searchcount DESC
    LIMIT 70;

    MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND tagcontent.contentid = blog.blogid)
    INNER JOIN blog_user AS blog_user ON' at line 4 Error Number : 1064 Request Date : Tuesday, March 29th 2011 @ 02:14:26 PM


    thanks

    Guy
    Honda Motocross Forum

    Barter Forum

    Hiking Forum

  • #2
    Invalid SQL errors are almost always related to modified code.

    To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

    Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

    [Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

    Next, disable all products (except vB Blog and vB CMS if you are running the Suite.)

    Admin CP -> Plugins & Products -> Manage Products -> Disable

    Then manually uncheck all plugins that are not for 'vBulletin Blog' and vBulletin CMS' here:

    Admin CP -> Plugins & Products -> Plugin Manager

    Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it.

    Do you have the same problem?
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      thanks for the quick reply.

      I havent modified any code, I wouldn't know how to. I think the last thing I dd was to enable adsense have a look and disable it and that was over a week ago. So basically its had no changes for, well I dont know how long. so why suddenly today does half my site disappear.

      I am away in a couple of hours for a couple of days, so will have to try when i get back. I quickly ran the "Suspect File Versions" but it didnt show any errors
      Honda Motocross Forum

      Barter Forum

      Hiking Forum

      Comment


      • #4
        If you have followed all of those instructions, fill out a support ticket at:

        http://members.vbulletin.com/members...ontactform.php

        Please include a complete description of the problem and be sure to include the login info to your Admin CP, phpMyAdmin and FTP in the 'Sensitive Data' field.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

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