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

XF 1.2 description DB error on style import

Discussion in 'Installation, Upgrade, and Import Support' started by SandyF, Sep 5, 2013.

  1. SandyF

    SandyF Member

    I'm running the upgrade and exported my style, but on attempting to reimport it I get the following error:

    Mysqli prepare error: Unknown column 'description' in 'field list'

    1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    5. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1612
    6. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1601
    7. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1393
    8. XenForo_DataWriter->save() in XenForo/Model/Style.php at line 524
    9. XenForo_Model_Style->importStyleXml() in XenForo/ControllerAdmin/Style.php at line 182
    10. XenForo_ControllerAdmin_Style->actionImport() in XenForo/FrontController.php at line 337
    11. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    12. XenForo_FrontController->run() in /home/xxxxx/public_html/xxxxxxx/admin.php at line 13
    Should I just delete the section in the xml that refers to description?

    Help! Thanks
     
  2. Mike

    Mike XenForo Developer Staff Member

    No, that's indicative of a missing column in the database. This is a bad thing as I think this has been around since the beginning. Have you uninstalled any add-ons recently? It sounds like one of them deletes a column it shouldn't.
     
  3. SandyF

    SandyF Member

    The only add-on I've ever installed is the Trophy Promo and that was a long time ago.
     
  4. Mike

    Mike XenForo Developer Staff Member

    Can you go to <url>/install/ and run through the master data rebuild? At the end, it should do a check on the database. Do you get any errors/warnings?
     
  5. SandyF

    SandyF Member

    Ok, did that. The error message I get is:

    Uh oh, your upgrade to 1.2.1 has failed!

    The following elements of the database are incorrect:

    • Column xf_style.description missing.
    This is likely caused by an add-on conflict. You may need to restore a backup, remove the offending add-on data from the database, and retry the upgrade. Contact support if you are not sure how to proceed.
     
  6. Mike

    Mike XenForo Developer Staff Member

    If you didn't get that error after upgrading (and instead saw the "the upgrade was completed successfully" message), then it must have disappeared since then. Strictly speaking, I would recommend restoring from a backup and identifying why the column went missing.

    However, if that is not an option, you should be able to run this query to restore it:
    Code:
    ALTER TABLE xf_style ADD description VARCHAR(100) NOT NULL DEFAULT '';
     
  7. SandyF

    SandyF Member

    I had that error on the upgrade, which is why I went back and exported our style after reading the top post here. So, I'm guessing that column has been missing for awhile.

    I'll try running the query.
     
  8. SandyF

    SandyF Member

    That doesn't seem to be working - I should see description in structure under xf_style, correct?
     
  9. Mike

    Mike XenForo Developer Staff Member

    The query worked correctly for me. What error are you getting when you run it?
     
  10. SandyF

    SandyF Member

    Not getting an error. In phpMyAdmin, I go to my database, click on the tab "query" and in the box at the bottom marked "SQL query on database" I enter the query. I hit the button for Submit Query and it says Loading.... then nothing happens.
     
  11. Mike

    Mike XenForo Developer Staff Member

    I'm not sure what to suggest - that sounds like an issue with phpMyAdmin not running the query. It's hard to guess why - I suppose mod_security could be interfering. You may be able to get your host to run that query directly for you or to at least investigate if something is blocking phpMyAdmin (like mod_security).
     
  12. SandyF

    SandyF Member

    Strangely, when I tried it with the Query Window it did work.

    Although I see a new error now that I just tried to ban a user:

    Mysqli prepare error: Table 'pilonida_xfpilo.xf_ip_match' doesn't exist

    1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
    5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Model/Banning.php at line 134
    6. XenForo_Model_Banning->countBannedIps() in XenForo/ControllerAdmin/User.php at line 69
    7. XenForo_ControllerAdmin_User->actionIndex() in XenForo/FrontController.php at line 337
    8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    9. XenForo_FrontController->run() in /home/xxxxx/public_html/xxxx/admin.php at line 13
     
  13. Mike

    Mike XenForo Developer Staff Member

    I don't know if the integrity of your database can be trusted. This table has existed since day one, as has the other column. It really strongly recommend that you restore to a backup (a known working one ideally).

    If random tables and columns have gone missing (there's nothing in XF that would remove these), that's a very bad thing.
     

Share This Page