I have a few sites in MODX 3.0.5 and am seeing a weird issue.
In one, the menus, after clearing the site cache, have the right page titles but are linking to the wrong pages, so [[~(resource ID)]] is wrong, even though the page titles are correct.
On a second one, I have some page scripts loading the wrong data or timing out because they’re not get the info (like TV values) that they are expecting. I put this on one of these pages:
[[*id]]-[[!*id]]
to track the cached and uncached ID numbers on display. What I found was that, right after clearing the cache, I got this result:
201-1
And then, after immediately reloading the page without clearing the cache, the values are now:
201-201
So, on the first pass the uncached ID number is “1”, which is not the resource’s ID number. Even if I put the ID tags at the very top of the page template, before any snippets or other coding has loaded, I see the same result.
The only error in the log is:
(ERROR @ /www/core/src/Revolution/Filters/modOutputFilter.php : 722) PHP warning: Undefined array key 1
(ERROR @ /www/core/vendor/xpdo/xpdo/src/xPDO/Om/xPDOObject.php : 806) Backstage\v3\Model\Change: Attempt to set NOT NULL field changeset to NULL
This particular site is a Backstage setup in MODX Cloud, and the problem is NOT happening on the live site, just on the development site with Backstage installed. When the page is reloaded after the first viewing, and the uncached ID matches the cached one, no more errors are recorded.
What could be causing this? It’s really weird. This only started happening after updating MODX, although maybe some Extra update is involved??