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

XF 1.1 unserialize(): Error at offset 2986 of 2993 bytes

Discussion in 'Troubleshooting and Problems' started by Divvens, Jun 16, 2013.

  1. Divvens

    Divvens Well-Known Member

    I've been getting the following error on the local installation of my site on xampp. This happens after installing an add-on and when it rebuilds the cache (exactly at rebuilding templates)

    unserialize(): Error at offset 2986 of 2993 bytes
    unserialize() in C:\xampp\htdocs\oj\library\XenForo\Model\Template.php at line 1002
    XenForo_Model_Template->compileTemplateInStyleTree() in C:\xampp\htdocs\oj\library\XenForo\Model\Template.php at line 968
    XenForo_Model_Template->compileNamedTemplateInStyleTree() in C:\xampp\htdocs\oj\library\XenForo\Model\Template.php at line 925
    XenForo_Model_Template->compileAllTemplates() in C:\xampp\htdocs\oj\library\XenForo\CacheRebuilder\Template.php at line 55
    XenForo_CacheRebuilder_Template->rebuild() in C:\xampp\htdocs\oj\library\XenForo\ControllerHelper\CacheRebuild.php at line 26
    XenForo_ControllerHelper_CacheRebuild->rebuildCache() in C:\xampp\htdocs\oj\library\XenForo\ControllerAdmin\Tools.php at line 78
    XenForo_ControllerAdmin_Tools->actionCacheRebuild() in C:\xampp\htdocs\oj\library\XenForo\FrontController.php at line 310
    XenForo_FrontController->dispatch() in C:\xampp\htdocs\oj\library\XenForo\FrontController.php at line 132
    XenForo_FrontController->run() in C:\xampp\htdocs\oj\admin.php at line 13
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Divvens likes this.
  3. Divvens

    Divvens Well-Known Member

    It's on my local xampp, I have no idea how I can give you those details. But here is a report from the error log
    Error Info
    ErrorException: unserialize(): Error at offset 2986 of 2993 bytes - library\XenForo\Model\Template.php:1002
    Generated By: Divvens, Yesterday at 6:35 PM
    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', 'C:\xampp\htdocs...', 1002, Array)
    #1 C:\xampp\htdocs\oj\library\XenForo\Model\Template.php(1002): unserialize('a:2:{i:0;a:5:{s...')
    #2 C:\xampp\htdocs\oj\library\XenForo\Model\Template.php(968): XenForo_Model_Template->compileTemplateInStyleTree(Array)
    #3 C:\xampp\htdocs\oj\library\XenForo\Model\Template.php(925): XenForo_Model_Template->compileNamedTemplateInStyleTree('EWRblock_RawHyp...', 0)
    #4 C:\xampp\htdocs\oj\library\XenForo\CacheRebuilder\Template.php(55): XenForo_Model_Template->compileAllTemplates(11.419785022736, 0, 0)
    #5 C:\xampp\htdocs\oj\library\XenForo\ControllerHelper\CacheRebuild.php(26): XenForo_CacheRebuilder_Template->rebuild(0, Array, NULL)
    #6 C:\xampp\htdocs\oj\library\XenForo\ControllerAdmin\Tools.php(78): XenForo_ControllerHelper_CacheRebuild->rebuildCache(Array, 'admin.php?add-o...', 'admin.php?tools...', true)
    #7 C:\xampp\htdocs\oj\library\XenForo\FrontController.php(310): XenForo_ControllerAdmin_Tools->actionCacheRebuild()
    #8 C:\xampp\htdocs\oj\library\XenForo\FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #9 C:\xampp\htdocs\oj\admin.php(13): XenForo_FrontController->run()
    #10 {main}
    Request State
    array(3) {
      ["url"] => string(49) "http://localhost/oj/admin.php?tools/cache-rebuild"
      ["_GET"] => array(1) {
        ["tools/cache-rebuild"] => string(0) ""
      ["_POST"] => array(5) {
        ["process"] => string(1) "1"
        ["caches"] => string(44) "["Template","AdminTemplate","EmailTemplate"]"
        ["position"] => string(1) "0"
        ["redirect"] => string(18) "admin.php?add-ons/"
        ["_xfToken"] => string(53) "2,1371387902,db504594ec277ac4ed6cc6fd4c9de379377fb56d"
    Hmm, so is the rawhypertext template the one corrupt?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    This is the template name (presumably truncated):


    And it's in the master style (style_id 0).

    Basically reinstall XenPorta, or manually delete that template from the master then reinstall XenPorta.
    Divvens likes this.
  5. Divvens

    Divvens Well-Known Member

    Thanks Jake :) This has sorted the problem. I deleted the block that the template belonged to, it's strange that error is only present on my local install and not on my live site.
    Jake Bunce likes this.
  6. Divvens

    Divvens Well-Known Member

    Jake, I thought I'll update it here if anyone else faces this problem.

    After I tried to fix the problem yesterday, it still persisted. And it started giving a new error, and the ACP went all wonky and out of order. It then said that a "page node" template was faulty, I deleted that page node and the problem was solved.

    This however only happens on my local install and not my live site online, so I have no idea what's going on but the page node that was coming up as faulty does use statements such as this
    <img src="http://orojackson.com/data/avatars/m/0/31.jpg" alt="Member Avatar" style="float:left; margin-right: 10px;"/>
    Maybe xampp or my local install doesn't like that?

    But the problem is sorted out for now after deleting that page node.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I am not aware of any underlying cause for this problem. It's just generic corruption AFAIK.
    Divvens likes this.

Share This Page