Invalid SQL: DELETE FROM activitystream...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Valter
    Senior Member
    • Aug 2005
    • 100
    • 4.1.x

    [Forum] Invalid SQL: DELETE FROM activitystream...

    I get this error while moving posts to another thread:

    Database error in vBulletin 4.2.0:

    Invalid SQL:
    DELETE FROM activitystream
    WHERE
    typeid =
    AND
    contentid IN (SELECT postid FROM post WHERE threadid IN (16682,27746));

    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
    contentid IN (SELECT postid FROM post WHERE threadid IN (16682,27746))' at line 4
    Error Number : 1064
    Request Date : Thursday, May 24th 2012 @ 12:29:53 PM
    Error Date : Thursday, May 24th 2012 @ 12:29:54 PM
    Script : http://www.XXX.com/inlinemod.php?do=...,828035,828234
    Referrer : http://www.XXX.com/inlinemod.php?threadid=16682&p=
    IP Address : XXX
    Username : XXX
    Classname : vB_Database
    MySQL Version : 5.0.95-community
    So typeid is blank.

    In thread.php:
    Code:
    typeid = {$typeid}
    and:
    Code:
    $typeid = vB::$vbulletin->activitystream['forum_post']['typeid'];
    How to fix this?
  • faquick
    New Member
    • Jan 2007
    • 19
    • 4.2.x

    #2
    Got the same error here on our forums, same scenario: moving posts to another thread.
    fab---

    Comment

    • Lynne
      Former vBulletin Support
      • Oct 2004
      • 26255

      #3
      You should enter this into the bug tracker.

      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 <- awesome site for html/css help

      Comment

      • Dolomites
        Member
        • Jan 2007
        • 35
        • 4.0.0

        #4
        Same error while moving posts to another thread, important to solve because actually it is impossible move posts without errors....

        Comment

        • Lynne
          Former vBulletin Support
          • Oct 2004
          • 26255

          #5
          Did anybody enter this into Jira? If so, please post a link here so other's can follow the bug.

          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 <- awesome site for html/css help

          Comment

          • KittyWireless
            New Member
            • Jul 2010
            • 2

            #6
            Same error here.

            Comment

            • jimnyc
              Senior Member
              • Aug 2003
              • 191
              • 2.3.0

              #7
              Originally posted by Lynne
              Did anybody enter this into Jira? If so, please post a link here so other's can follow the bug.
              I honestly have no idea how to do anything with Jira, but I too am getting the same error, as follows:

              Database error in vBulletin 4.2.0:

              Invalid SQL:
              DELETE FROM activitystream
              WHERE
              typeid =
              AND
              contentid IN (SELECT postid FROM post WHERE threadid IN (35291,35297));

              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
              contentid IN (SELECT postid FROM post WHERE threadid IN (35291,35297))' at line 4
              .

              Comment

              • Sunka
                Senior Member
                • Nov 2008
                • 131
                • 3.8.x

                #8
                Lynne, coud you enter this error into Jira?
                It is major problem vB 4.2.0

                Comment

                • Lynne
                  Former vBulletin Support
                  • Oct 2004
                  • 26255

                  #9
                  Originally posted by Sunka
                  Lynne, coud you enter this error into Jira?
                  It is major problem vB 4.2.0
                  I cannot duplicate it at all. I need specific steps in order to duplicate this so I can write a bug report.

                  what I did (which resulted in no database error):
                  - wrote two posts in a thread
                  - selected those two posts while in the thread and selected Move Posts from the dropdown Moderation Tools menu
                  - on the next screen I entered the URL to an existing thread
                  - everything worked fine

                  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 <- awesome site for html/css help

                  Comment

                  • Paul M
                    Former Lead Developer
                    vB.Com & vB.Org
                    • Sep 2004
                    • 9886

                    #10
                    @ Anyone who has this error ;

                    In your ACP, try going to Options > Activity Stream and then re-save the options. The error suggests your AS datastore may not be correctly populated.
                    Baby, I was born this way

                    Comment

                    • Amaury
                      Senior Member
                      • Mar 2012
                      • 1807
                      • 4.2.X

                      #11
                      Originally posted by Paul M
                      @ Anyone who has this error ;

                      In your ACP, try going to Options > Activity Stream and then re-save the options. The error suggests your AS datastore may not be correctly populated.
                      Well, it fixed the issue of it not highlighting posts after the 1st post, but I'm still getting a DBE, and it's the same when trying to merge threads or posts. They go through, but the error appears.

                      I'd be more than willing to submit it to JIRA, but I want to make sure that it's a bug 100%.
                      Former vBulletin user

                      Comment

                      • Paul M
                        Former Lead Developer
                        vB.Com & vB.Org
                        • Sep 2004
                        • 9886

                        #12
                        Well its not one I can reproduce (nor can Lynne).

                        From looking at the code, it gets the typeid from the activity stream datastore.

                        So, tbh, without site/ftp/database access, not much more we can do.
                        Baby, I was born this way

                        Comment

                        • Lynne
                          Former vBulletin Support
                          • Oct 2004
                          • 26255

                          #13
                          Try disabling all your modifications and use a totally default style and then try the merge and see if you still get the same database error.

                          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 <- awesome site for html/css help

                          Comment

                          • Amaury
                            Senior Member
                            • Mar 2012
                            • 1807
                            • 4.2.X

                            #14
                            Also, I'm not sure if it was always like this and I'm just noticing it now or if it happened on 4.2.0, but the editor box is too much to the right on the merge page.

                            Click image for larger version

Name:	Editor.jpg
Views:	1
Size:	55.7 KB
ID:	3687390
                            Former vBulletin user

                            Comment

                            • Lynne
                              Former vBulletin Support
                              • Oct 2004
                              • 26255

                              #15
                              I believe it's your style. Create a new style with no parent:
                              • Styles & Templates > Style Manager > Add New Style
                              • Parent Style: No Parent Style
                              • Title: Default vBulletin
                              • Allow User Selection: Yes
                              • Save


                              Then browse the site using that totally default vbulletin style - do you still have the same problem?

                              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 <- awesome site for html/css help

                              Comment

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