Announcement

Collapse
No announcement yet.

UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'; error

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

  • [Forum] UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'; error

    I am attempting to update from 4.0.3 to 4.0.4 and I am getting the following error:


    Database error in vBulletin 4.0.3:

    Invalid SQL:
    UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages';

    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 'UPDATEsmf_setting SET value = 3 WHERE varname = 'viewattachedimages'' at line 1
    Error Number : 1064
    Request Date : Friday, June 18th 2010 @ 06:01:01 AM
    Error Date : Friday, June 18th 2010 @ 06:01:01 AM
    Script : *******/install/upgrade_404.php?step=2
    Referrer : *******/install/upgrade_404.php?step=1
    IP Address : ***.71.120.76
    Username :
    Classname : vB_Database
    MySQL Version : 5.1.46-log

  • #2
    Are you running any addons?

    Not seen this error posted before as yet so I would disable any plugins/addons you may have and try again

    Comment


    • #3
      I am also getting the same error. No addons, pure vB uploaded. There seems to be an error in the query created.

      PHP Code:
      Invalid SQL:
      UPDATEvB_setting SET value 3 WHERE varname 'viewattachedimages';

      MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATEvB_setting SET value = 3 WHERE varname = 'viewattachedimages'' at line 1
      Error Number  
      1064
      Request Date  
      FridayJune 18th 2010 12:31:37 PM
      Error Date    
      FridayJune 18th 2010 12:31:37 PM
      Script        
      : ****/install/upgrade_404.php?step=2
      Referrer      
      : ***/install/upgrade_404.php?step=1
      IP Address    
      : ******
      Username      
      Classname     vB_Database
      MySQL Version 
      5.0.90-community-log 

      Comment


      • #4
        I have disabled all plugins and add-ons and I am still getting the error.

        Comment


        • #5
          There's indeed a bug in the upgrade_404.php file. The block in line 231, when creating the query.

          PHP Code:
              if (!$vbulletin->options['attachthumbs'] AND $vbulletin->options['viewattachedimages'] == 1)
              {
                  
          // Set viewattachedimages = 3 when we had thumbnails disabled and view full images enabled
                  
          $upgrade->run_query(
                      
          sprintf($upgradecore_phrases['altering_x_table'], 'setting'11),
                          
          "UPDATE" TABLE_PREFIX "setting SET value = 3 WHERE varname = 'viewattachedimages'"
                  
          );
              } 
          the UPDATE needs a space, so that it ends up being:

          PHP Code:
          "UPDATE " TABLE_PREFIX "setting SET value = 3 WHERE 

          Comment


          • #6
            The fix solves the error. The SQL string is wrongly created. This must be fixed by vB, but if you edit the line, you can run the script with all OK.

            Comment


            • #7
              Internet Brands QA people have a lot to answer for!

              Comment


              • #8
                Originally posted by cinenganos View Post
                The fix solves the error. The SQL string is wrongly created. This must be fixed by vB, but if you edit the line, you can run the script with all OK.
                thanks for the fix!
                Last edited by zelnik; Fri 18th Jun '10, 3:15am.

                Comment


                • #10
                  So when can we expect the install files to be fixed and re-posted so that we do not have to make fixes to the installation files ourselves?

                  Comment


                  • #11
                    Originally posted by CyberSultan View Post
                    So when can we expect the install files to be fixed and re-posted so that we do not have to make fixes to the installation files ourselves?
                    If you can't add a space to a text file without screwing it up, you might want to have someone else do the install.

                    Comment


                    • #12
                      This isn't the only post about issues with the install. I can update a file just fine. I shouldn't have to, though. So I'm glad you feel ok doing that with a product you purchased when it is obviously a screw-up that should be fixed by them.

                      Comment


                      • #13
                        That is strange. I upgraded fine with no error with the original code.
                        vBulletin - Sometimes, I'm just like, Wow, and then I'm like, Whoa, and then I'm like, Damn.

                        vBulletin.org's ol' Moderator

                        I have a lifetime terrorist hunting permit - #091101

                        chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

                        Comment


                        • #14
                          phew, thanks for posting this... really got my blood pressure up when I thought I f'ed up somewhere. Luckily It happenind during the upgrade of my test site, but still.. scary

                          Vb Team, can you PLEASE fix this in the download package? I don't get why the status is "scrubbed" in the bug tracker by the way

                          Comment


                          • #15
                            Originally posted by cinenganos View Post
                            There's indeed a bug in the upgrade_404.php file. The block in line 231, when creating the query.

                            PHP Code:
                                if (!$vbulletin->options['attachthumbs'] AND $vbulletin->options['viewattachedimages'] == 1)
                                {
                                    
                            // Set viewattachedimages = 3 when we had thumbnails disabled and view full images enabled
                                    
                            $upgrade->run_query(
                                        
                            sprintf($upgradecore_phrases['altering_x_table'], 'setting'11),
                                            
                            "UPDATE" TABLE_PREFIX "setting SET value = 3 WHERE varname = 'viewattachedimages'"
                                    
                            );
                                } 
                            the UPDATE needs a space, so that it ends up being:

                            PHP Code:
                            "UPDATE " TABLE_PREFIX "setting SET value = 3 WHERE 
                            Thank you so much for your help!! I thought I had done something wrong! This was greatly appreciated! =)

                            Comment

                            Related Topics

                            Collapse

                            Working...
                            X