OK, on further investigation the code has changed somewhat between 2.2.6 and 2.2.7. In 2.2.6, there is a function makeUrl in modcontext.class.php that searches for a resource ID in the aliasMap (at line 238) - if it doesn't find it, it just logs an error and exits. In 2.2.7 that search has been replaced by a call to the getResourceURI function (which is obviously new in 2.2.7), which will actually query the database if the aliasMap is empty.
So, I'd suggest upgrading to 2.2.7 - and then apply the very minor edit I suggested earlier, and this should do the trick.
Cheers,
Andy
Thanks. That makes perfect sense. The new code will fix a persistent problem with $modx->makeUrl();
Very happy to read that this has been fixed in 2.2.8, released today! (
http://tracker.modx.com/issues/9847)
I'll be sure to test on my environment and feed back.
Great work guys, thanks!
Hi
Stumbled upon this as I have the same problem. But with 2.2.8.
Happened to me after an upgrade from 2.0.8. The entire website now has no URLs, except where a weblink is set.
I found that by editing the resource alias (by appending a single letter for example) "reactivates" the alias for the page. Problem is that it is going to take a lot of time to edit every single page on the site.
Is there a quicker way to solve this?
Thanks
Warren
That sounds like a cache problem. Try manually deleting all the files in the core/cache directory (if you haven't already) and clearing your browser cache and cookies.
That worked, perfect! Thanks very much