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

Fixed Invalid model 'XenForo_Model_BbCodeMediaSites' specified

Discussion in 'Resolved Bug Reports' started by Jeremy P, Oct 5, 2011.

  1. Jeremy P

    Jeremy P Well-Known Member

    When uninstalling an addon on 1.1.

    1. XenForo_Model::create() in XenForo/Model.php at line 113
    2. XenForo_Model->getModelFromCache() in XenForo/Model/AddOn.php at line 443
    3. XenForo_Model_AddOn->deleteAddOnMasterData() in XenForo/DataWriter/AddOn.php at line 197
    4. XenForo_DataWriter_AddOn->_postDelete() in XenForo/DataWriter.php at line 1716
    5. XenForo_DataWriter->delete() in XenForo/ControllerAdmin/AddOn.php at line 116
    6. XenForo_ControllerAdmin_AddOn->actionDelete() in XenForo/FrontController.php at line 310
    7. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
     
    erich37 likes this.
  2. Kier

    Kier XenForo Developer Staff Member

    Fixed.
     
    Jeremy P likes this.
  3. Andy.N

    Andy.N Well-Known Member

    Should we redownload or it should be in next release?
     
  4. Mike

    Mike XenForo Developer Staff Member

    Everything is in the next release unless indicated otherwise. :)
     
    erich37 likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Next release.

    Edit: Ninja'ed :eek:
     
    Daracon and Jeremy like this.
  6. Kier

    Kier XenForo Developer Staff Member

    It's a single character to edit from line 443 of XenForo_Model_AddOn, I'm sure you can sort it out :)
     
    Jeremy P and Andy.N like this.
  7. Andy.N

    Andy.N Well-Known Member

    Here is line 443 in that file
    Code:
     $this->getModelFromCache('XenForo_Model_BbCodeMediaSites')->deleteBbCodeMediaSitesForAddOn($addOnId);
    What character did I miss?
     
  8. Jeremy P

    Jeremy P Well-Known Member

    I just changed it to XenForo_Model_BbCode, I think.
     
    Kier likes this.
  9. Andy.N

    Andy.N Well-Known Member

    That's not a single character, is it? ;)
     
    Jeremy P likes this.
  10. Jeremy P

    Jeremy P Well-Known Member

    No, but that's the model with the method 'deleteBbCodeMediaSitesForAddOn()'.
     
  11. Mike

    Mike XenForo Developer Staff Member

    Kier was mistaken. Jeremy is correct.
     
    Veer, Kier and Andy.N like this.
  12. Andy.N

    Andy.N Well-Known Member

    Upon changing it Jeremy's suggestion, everytime I tried to uninstall an addon, I have this new error

    Server Error

    Mysqli prepare error: Table 'forum.xf_bb_code_media_sites' 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 661
    5. Zend_Db_Adapter_Abstract->delete() in XenForo/Model/BbCode.php at line 318
    6. XenForo_Model_BbCode->deleteBbCodeMediaSitesForAddOn() in XenForo/Model/AddOn.php at line 443
    7. XenForo_Model_AddOn->deleteAddOnMasterData() in XenForo/DataWriter/AddOn.php at line 197
    8. XenForo_DataWriter_AddOn->_postDelete() in XenForo/DataWriter.php at line 1716
    9. XenForo_DataWriter->delete() in XenForo/ControllerAdmin/AddOn.php at line 116
    10. XenForo_ControllerAdmin_AddOn->actionDelete() in XenForo/FrontController.php at line 310
    11. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    12. XenForo_FrontController->run() in /var/data/public/forum/admin.php at line 13
     
  13. Mike

    Mike XenForo Developer Staff Member

    That would be a one character fix (table name is singular). :)
     
    Jeremy P likes this.
  14. Jeremy P

    Jeremy P Well-Known Member

    In complete honesty, I received that as well. Upgrading my test board went a little shaky so I just figured it was something I did. I ended up just commenting out like 443 of XenForo_Model_AddOn, none of the addons were tied to media sites anyway.
     
    Andy.N likes this.
  15. Andy.N

    Andy.N Well-Known Member

    Thanks Jeremy
    I commented that line out and get it to remove several of my addons.
     
  16. Jeremy P

    Jeremy P Well-Known Member

    To actually fix this, go to line 318 of XenForo_Model_BbCode and remove the 's' from 'xf_bb_code_media_sites'.
     
  17. Mike Hollis

    Mike Hollis Member

    XenForo_Model_BbCode ? is this a file? something done through the admin panel? forgive the question, still learning the system here
     
  18. Fuhrmann

    Fuhrmann Well-Known Member

    You can find the file here: library\XenForo\Model\BbCode.php
     
  19. Mike Hollis

    Mike Hollis Member

    Thank you I did find that, but I just installed yesterday so I went and just started over. I appreciate the info though
     
    Kier and Fuhrmann like this.
  20. sconcau84

    sconcau84 Member

    same problem

    Invalid model 'XenForo_Model_BbCodeMediaSites' specified

    1. XenForo_Model::create()inXenForo/Model.phpat line113
    2. XenForo_Model->getModelFromCache()inXenForo/Model/AddOn.phpat line443
    3. XenForo_Model_AddOn->deleteAddOnMasterData()inXenForo/DataWriter/AddOn.phpat line197
    4. XenForo_DataWriter_AddOn->_postDelete()inXenForo/DataWriter.phpat line1716
    5. XenForo_DataWriter->delete()inXenForo/ControllerAdmin/AddOn.phpat line116
    6. XenForo_ControllerAdmin_AddOn->actionDelete()inXenForo/FrontController.phpat line310
    7. XenForo_FrontController->dispatch()inXenForo/FrontController.phpat line132
    8. XenForo_FrontController->run()in/home/sconcaut/public_html/admin.phpat line13
     

Share This Page