I’ve looked and grepped my entire installation of ModXCMS for aliasListing occurrences, and have discovered that I am unable to find anywhere that this member variable ($modx->aliasListing / $this->aliasListing) is actually set, and not just read from. Maybe I’m missing something.
The problem is that my redirect page for my NewsPublisher snippet doesn’t seem to be working properly when "Use Friendly Alias Path" is enabled on my site. It calls makeUrl with an document identifier number, and makeUrl seems to only return "sitenamehere/numberhere.html" rather than anything else.
Any insight or help?
-
MODX Staff
- 10,725 Posts
That’s because it’s loaded via a reference to another variable name from the assets/cache/siteCache.idx.php.
The issue with NewsPublisher is because until the next request, the alias is not yet registered in the siteCache and the URL cannot be determined until the subsequent request. You need to direct to another page (perhaps a parent landing page) first, then it will be available on the next request.