Hi,
I recently tried to update my test server VM from 2.4.2 to something newer and encountered problems:
Wayfinder does not show the menu and internal links do not work when FURLs are enabled.
The Upgrade install runs through smoothly without errors, but after the first page load I get:
[2016-04-27 23:42:41] (ERROR @ /usr/local/www/modx/core/model/modx/modx.class.php : 690) PHP warning: Invalid argument supplied for foreach()
in the error log.
I tried 2.4.3, 2.4.4 and 2.5 (rolling back to the last working VM snapshot in between), the only difference between the versions is that the line number changes, but the error always comes from the getParentIds function, when it tries to access the resourceMap.
So I went to see the content of modx/core/cache/my.config/context_settings/web/context.cache.php and noticed, that resourceMap is completely missing from the array, whereas aliasMap is definded, but empty:
When I compare the file contents to the version before the upgrade, aliasMap and resourceMap are there and filled properly.
So I went to check the database:
"select uri, alias from modx_site_content;"
shows URI and alias columns are filled correctly.
The system is running with php 5.6.20 (not yet upgraded to php 7).
I also tried the following steps:
- resetting permissions in all directories by chowning everything to the correct owner and group
- emptying the cache from manager before upgrading
- deleting the cache directory contents before upgrading
- Manage->Clear Cache->Recalculate URIs
- turning on and off FURLs in settings (internal site navigation works when FURLs are off)
- recalculateURIs.php (found that in an older post)
The other odd thing I notice is, that before the upgrade, I have the directories "mgr", "web" and "test" in the context_settings directory, whereas after deleting the cache directory and upgrading there are only the directories "mgr", "web" left.
I remember having a "test" context, which I deleted long ago, so maybe it was just still sitting there in the cache directory (I have never emptied the cache directory manually before).
Could you please give me advice what to try or where to look next? I can always roll back to the working 2.4.2 snapshot and try different steps over again if necessary.
Regards,
Marc