We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19328
    • 433 Posts
    All of a sudden on a MODx Revolution 2.0.6-pl2 (traditional) site some strange things are happening: the wayfinder menu dissappears, or a page doesn't load and just gives a blank screen. After I clear the cache, everything is working again.

    When I look in the error log, I see these errors:

    (ERROR @ /usr/cust/mywebsite/htdocs/core/components/wayfinder/wayfinder.class.php : 121) 
    PHP warning: ksort() expects parameter 1 to be array, integer given
    


    And:
    (ERROR @ /usr/cust/mywebsite/htdocs/core/components/wayfinder/wayfinder.class.php : 190) 
    PHP warning: Invalid argument supplied for foreach()
    


    And also:
    (ERROR @ /index.php) context for 46 is web
    


    And this one:
    (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, 
    `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, 
    `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, 
    `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, 
    `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, 
    `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, 
    `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, 
    `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, 
    `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, 
    `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, 
    `modResource`.`donthit`, `modResource`.`haskeywords`, `modResource`.`hasmetatags`, 
    `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, 
    `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, 
    `modResource`.`content_type` FROM `modx_site_content` AS `modResource` WHERE  (  ( 
    modResource.parent IN 
    (46,57,99,100,102,103,104,105,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
    128,129,130,131,132,133,134,135,136,137,138,161,162,163,164,166,167,168,169,170,171,172,
    193,196,198,199,200,201,202,203,205,212,224,226,227,228,229,233,234,230,231,235,236,237,55) 
    AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND
     `modResource`.`hidemenu` = 0 )  AND `modResource`.`id` NOT IN (55) )  
    ORDER BY publishedon DESC, pagetitle DESC LIMIT 9 
    
    


    All these errors appear multiple times after each other.

    Resource with id 46 is a news page, with this snippet call in it:
    [[!getPage?
       &elementClass=`modSnippet`
       &element=`getResources` 
       &parents=`46`
       &resources=`-55`
       &limit=`9`
       &pageVarKey=`page` 
       &includeTVs=`1`
       &includeContent=`1`
       &tpl=`actueelTpl`
       &depth=`1`
       &pageLimit=`13`
       &debug=`false`
       &sortby=`{"publishedon":"DESC","pagetitle":"DESC"}`
    ]]
    
    


    Resource with id 55 is the archive page, with this in it:
    [[!getPage?
      &element=`getArchives`
      &elementClass=`modSnippet`
      &tpl=`actueelTpl`
      &hideContainers=`1`
      &pageVarKey=`page`
      &parents=`46`
      &includeTVs=`1`
      &includeContent=`1`
      &toPlaceholder=`archives`
      &limit=`0`
      &cache=`0`
    ]]
    [[+archives]]
    [[!+page.nav:notempty=`
    
    <div class="paging">  
    <ul class="pageList">
    [[!+page.nav]]  
    </ul>
    </div>
    
    `]]
    



    I have no idea what is going on, can you help me understand these errors?

    My Wayfinder version is 2.3.3
    getPage is 1.2.1
    geResources is 1.4.0

    Thanks in advance for any help!
    [ed. note: michelle84 last edited this post 14 years, 9 months ago.]
      • 22303 MODX Staff
      • 10,725 Posts
      You absolutely need to upgrade to at least 2.0.8, and you likely need to upgrade to 2.1+. There were some issues in 2.0 regarding cache file corruption, especially before 2.0.8, and further improvements to prevent multiple threads from writing the cache files simultaneously on busy sites in 2.1+.
        • 19328
        • 433 Posts
        Ok, thanks, at least I know what the problem is now smiley. I'll upgrade!