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

Manually rebuild Admin Template

Discussion in 'XenForo Questions and Support' started by KozmoK, Mar 27, 2013.

  1. KozmoK

    KozmoK Active Member

    Ok, here is what I did.. I win the dunce of the week award for this!

    After upgrade went smoothly. I was wondering what would happen if someone went to /install after the upgrade.

    Well it shows the rebuild button which I clicked. Then I went in and renamed the install directory to something else, so no one could get to it.

    Well it wasn't done rebuilding.. So it (I) jacked up my admin panel. Now the /install doesn't even work anymore, I get 500 errors. Admin Control panel looks all messed up now too.

    Anyway to recover this manually?
     
  2. Biker

    Biker Well-Known Member

    Go rename it back to /install and try again?
     
  3. KozmoK

    KozmoK Active Member

    Yup, Tried that. I went into tools, and clicked on all the rebuilds I can find, but there is none for any admin templates
     
  4. Biker

    Biker Well-Known Member

    You might have to upload the files again and then run another upgrade from /install.
     
  5. Mike

    Mike XenForo Developer Staff Member

    The code in /install is mostly independent. You need to rebuild the master data from there. If you're getting a 500 error, you'll need to look in your web server logs for more information.
     
  6. KozmoK

    KozmoK Active Member

    This is while I was doing my dumb actions...


    Error Info
    ErrorException: file_get_contents(/disk2/xxxxx/forums/install/templates/cache_rebuild.php): failed to open stream: No such file or directory - library/XenForo/Template/Abstract.php:206
    Generated By: KozmoK, Yesterday at 10:53 PM
    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError(2, 'file_get_conten...', '/disk2/rentache...', 206, Array)
    #1 /disk2/xxxx/forums/library/XenForo/Template/Abstract.php(206): file_get_contents('/disk2/rentache...')
    #2 /disk2/xxxx/forums/library/XenForo/ViewRenderer/Json.php(226): XenForo_Template_Abstract->render()
    #3 /disk2/xxxx/forums/library/XenForo/Install/View/CacheRebuild.php(7): XenForo_ViewRenderer_Json->getDefaultOutputArray('XenForo_Install...', Array, 'cache_rebuild')
    #4 /disk2/xxxx/forums/library/XenForo/ViewRenderer/Abstract.php(217): XenForo_Install_View_CacheRebuild->renderJson()
    #5 /disk2/xxxx/forums/library/XenForo/ViewRenderer/Json.php(88): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_Install...', 'Json', Array, 'cache_rebuild')
    #6 /disk2/xxxx/forums/library/XenForo/FrontController.php(533): XenForo_ViewRenderer_Json->renderView('XenForo_Install...', Array, 'cache_rebuild', NULL)
    #7 /disk2/xxxx/forums/library/XenForo/FrontController.php(156): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_Json), Array)
    #8 /disk2/xxxx/forums/install/index.php(18): XenForo_FrontController->run()
    #9 {main}
    Request State
    array(3) {
    ["url"] => string(66) "http://www.xxxx.com/forums/install/index.php?upgrade/rebuild"
    ["_GET"] => array(1) {
    ["upgrade/rebuild"] => string(0) ""
    }
    ["_POST"] => array(8) {
    ["process"] => string(1) "1"
    ["caches"] => string(105) "["ImportTemplate","Template","ImportAdminTemplate","AdminTemplate","ImportEmailTemplate","EmailTemplate"]"
    ["position"] => string(1) "0"
    ["redirect"] => string(26) "index.php?upgrade/complete"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(41) "/forums/install/index.php?upgrade/rebuild"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
     
  7. KozmoK

    KozmoK Active Member

    Now this is what I get:


    Exception: String could not be parsed as XML - library/XenForo/Model/AdminNavigation.php:0
    Generated By: KozmoK, 51 minutes ago
    Stack Trace
    #0 /disk2/xxxx/forums/library/XenForo/Model/AdminNavigation.php(0): SimpleXMLElement->__construct()
    #1 /disk2/xxxx/forums/library/XenForo/CacheRebuilder/ImportMasterData.php(35): XenForo_Model_AdminNavigation->importAdminNavigationDevelopmentXml('/disk2/rentache...')
    #2 /disk2/xxxx/forums/library/XenForo/ControllerHelper/CacheRebuild.php(26): XenForo_CacheRebuilder_ImportMasterData->rebuild(0, Array, ' . ')
    #3 /disk2/xxxx/forums/library/XenForo/Install/Controller/Upgrade.php(232): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'index.php?upgra...', 'index.php?upgra...', true)
    #4 /disk2/xxxx/forums/library/XenForo/FrontController.php(310): XenForo_Install_Controller_Upgrade->actionRebuild()
    #5 /disk2/xxxx/forums/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #6 /disk2/xxxx/forums/install_old/index.php(18): XenForo_FrontController->run()
    #7 {main}
    Request State
    array(3) {
    ["url"] => string(70) "http://www.xxxx.com/forums/install_old/index.php?upgrade/rebuild"
    ["_GET"] => array(1) {
    ["upgrade/rebuild"] => string(0) ""
    }
    ["_POST"] => array(5) {
    ["process"] => string(1) "1"
    ["caches"] => string(161) "["ImportMasterData","Permission","ImportPhrase","Phrase","ImportTemplate","Template","ImportAdminTemplate","AdminTemplate","ImportEmailTemplate","EmailTemplate"]"
    ["position"] => string(1) "0"
    ["redirect"] => string(26) "index.php?upgrade/complete"
    ["_xfToken"] => string(8) "********"
    }
    }
     
  8. Mike

    Mike XenForo Developer Staff Member

    I could really only recommend reuploading the files now - and it doesn't look like the install directory has been renamed back.
     
  9. KozmoK

    KozmoK Active Member

    I fixed it...

    when I renamed it back, it was still looking for the old directory. For some reason the old directory was kept in db or cache somewhere...

    So I copied the install to install_old and then it ran fine.



     
  10. Brogan

    Brogan XenForo Moderator Staff Member

  11. KozmoK

    KozmoK Active Member

    BTW Thanks for all your input :) I'm back in biz
     

Share This Page