Data Base Error Help me

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • faraz_hamza
    Member
    • Dec 2008
    • 34

    [Forum] Data Base Error Help me

    Aslam-o-Alikum All.

    Respected Seniors, i m getting an isue. i just update my Vbulletin to 4.2, and now when i try to merge two threads then i get this error


    Code:
    Database error in vBulletin 4.2.0:
    
    
    Invalid SQL:
    DELETE FROM activitystream
                WHERE
                    typeid = 
                        AND
                    contentid IN (SELECT postid FROM post WHERE threadid IN (24188,24084));
    
    
    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 (24188,24084))' at line 4
    Error Number  : 1064
    Request Date  : Tuesday, June 5th 2012 @ 10:43:27 AM
    Error Date    : Tuesday, June 5th 2012 @ 10:43:28 AM
    Script        : http://www.*****.com/forum/inlinemod.php?do=domergethreads&threadids=24188,24084
    Referrer      : http://www.****.com/forum/login.php?do=login
    IP Address    : 
    Username      : Mr hamza
    Classname     : vB_Database
    MySQL Version : 5.0.95
    so kindly help me.... how can i remove this error...... while mergeing two threads

    waiting for your kind reply
  • MEsh3L85
    Senior Member
    • Mar 2011
    • 227
    • 4.1.x

    #2
    try to disable plug-ins first .

    i think its an issue with one of your hacks.

    Comment

    • Thunderbird
      Senior Member
      • Jan 2010
      • 128
      • 4.2.X

      #3
      It's happening because of this issue.

      Comment

      • Matthew Gordon
        Senior Member
        • May 2002
        • 3243
        • 1.1.x

        #4
        Indeed, it's a known issue when the CMS isn't installed. If you remove this code in vb/activitystream/populate/forum/thread.php, the error will go away.

        PHP Code:
        $typeid vB::$vbulletin->activitystream['cms_comment']['typeid'];
                
        // delete CMS data (just in case)
                
        vB::$db->query_write("DELETE FROM " TABLE_PREFIX "activitystream
                    WHERE
                        typeid = 
        {$typeid}
                            AND
                        contentid IN (SELECT postid FROM " 
        TABLE_PREFIX "post WHERE threadid IN (" implode(","$threadids) . "))
                "
        ); 

        Comment

        • faraz_hamza
          Member
          • Dec 2008
          • 34

          #5
          MAthew and Thunderbird thanks for your kind reply

          isue is resolved i just add
          /* and */ code to disable this code and my all errors are fixed. but now i m facing a new one error. after upgrading. my schedual task leave to work. last day my session table was fulled to 16Mb and site was failed to open then i empty the session table. then i notice my schedule task are not working

          my scheduled tasks are not working properly.

          Title----------------------------NextTime
          Process E-Mail Queue-------- 29-05-2012
          Activity Stream Popularity Update----29-05-2012
          Daily Statistics Log-----------------30-05-2012
          Hourly Cleanup------------30-05-2012

          what to do now?

          Comment

          • Bigmuz7
            Senior Member
            • Jul 2010
            • 143
            • 4.1.x

            #6
            Originally posted by Matthew Gordon
            Indeed, it's a known issue when the CMS isn't installed. If you remove this code in vb/activitystream/populate/forum/thread.php, the error will go away.

            PHP Code:
            $typeid vB::$vbulletin->activitystream['cms_comment']['typeid'];
                    
            // delete CMS data (just in case)
                    
            vB::$db->query_write("DELETE FROM " TABLE_PREFIX "activitystream
                        WHERE
                            typeid = 
            {$typeid}
                                AND
                            contentid IN (SELECT postid FROM " 
            TABLE_PREFIX "post WHERE threadid IN (" implode(","$threadids) . "))
                    "
            ); 
            Hmm so for forum only 4.2 this is the fix yes ? ... dont mean to be obvious but I aint gonna dick with some code on my setup without a definate from you guys ?
            www.plantandconstruction.co.uk

            Comment

            • TheLastSuperman
              Senior Member
              • Sep 2008
              • 1799

              #7
              Yes, removing that snippet of code from the file is the fix for now until a new version is released.


              Former vBulletin Support Staff
              Hacked recently? See my blog post "Recovering a Hacked vBulletin Site".
              Thinking outside the box? Need modification support? Visit www.vBulletin.org and have at it!

              Comment

              • Matthew Gordon
                Senior Member
                • May 2002
                • 3243
                • 1.1.x

                #8
                Originally posted by faraz_hamza
                MAthew and Thunderbird thanks for your kind reply

                isue is resolved i just add
                /* and */ code to disable this code and my all errors are fixed. but now i m facing a new one error. after upgrading. my schedual task leave to work. last day my session table was fulled to 16Mb and site was failed to open then i empty the session table. then i notice my schedule task are not working

                my scheduled tasks are not working properly.

                Title----------------------------NextTime
                Process E-Mail Queue-------- 29-05-2012
                Activity Stream Popularity Update----29-05-2012
                Daily Statistics Log-----------------30-05-2012
                Hourly Cleanup------------30-05-2012

                what to do now?
                Make sure this is still in your footer template.
                Code:
                	<!-- Do not remove cronimage or your scheduled tasks will cease to function -->
                	{vb:raw cronimage}
                	<!-- Do not remove cronimage or your scheduled tasks will cease to function -->

                Comment

                • Bigmuz7
                  Senior Member
                  • Jul 2010
                  • 143
                  • 4.1.x

                  #9
                  Originally posted by TheLastSuperman
                  Yes, removing that snippet of code from the file is the fix for now until a new version is released.

                  Ok Thx guys thats definately cured it .. I tested plenty of post moving and all is good
                  www.plantandconstruction.co.uk

                  Comment

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