1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error On Upgrade

Discussion in 'Media Gallery Support' started by Brent W, Dec 27, 2014.

  1. Brent W

    Brent W Well-Known Member

    Trying to get XMG upgraded to latest version and getting this:

    Server Error
    Mysqli prepare error: Unknown column 'rating_weighted' in 'field list'
    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
    Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1640
    XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1609
    XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
    XenForo_DataWriter->save() in XenGallery/Deferred/MediaRating.php at line 29
    XenGallery_Deferred_MediaRating->execute() in XenForo/Model/Deferred.php at line 256
    XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 390
    XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 335
    XenForo_Model_Deferred->run() in XenForo/ControllerAdmin/Tools.php at line 159
    XenForo_ControllerAdmin_Tools->actionRunDeferred() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/nginx/domains/yabucket.com/public/admin.php at line 13
  2. Chris D

    Chris D XenForo Developer Staff Member

    What version are you upgrading from?
  3. Brent W

    Brent W Well-Known Member

  4. Chris D

    Chris D XenForo Developer Staff Member


    The only vague explanation I can give is that the following query failed to run during upgrade:

    ALTER TABLE xengallery_media ADD COLUMN rating_weighted float DEFAULT '0' NOT NULL AFTER rating_avg
    Run that query and for good measure re-run the upgrade with the XML file.
  5. Brent W

    Brent W Well-Known Member

    Running that returns this:

    [SQL]ALTER TABLE xengallery_media ADD COLUMN rating_weighted float DEFAULT '0' NOT NULL AFTER rating_avg;
    [Err] 1050 - Table 'yabucket/#sql-ib292' already exists
  6. Chris D

    Chris D XenForo Developer Staff Member

    Well, that would probably explain why it didn't run in the first place. That error doesn't make any sense, though. The query is adding a column to a table. The error is stating that some other table already exists.

    I can't see much info about it other than people describing similar effects after MySQL has crashed. There doesn't seem to be any concrete solutions in those cases, though. One solution seemed to be dropping the entire database, but that seems somewhat extreme :)

    I should add, that the obvious solution is to try and drop the 'yabucket/#sql-ib292' table, but most people have said that doing that didn't work or that table could not be found (even though the error states it's available).
  7. Mike

    Mike XenForo Developer Staff Member

    That's an error relating to a MySQL temporary table. I'd check your MySQL error log to see if it has any errors. This may be an indication of a disk space problem (where MySQL is creating temporary tables).
    Brent W and Chris D like this.
  8. Brent W

    Brent W Well-Known Member

    Thanks, it was a disk space issue.

Share This Page