I have a slight problem with Modx3 wheras pages that are set to not cache are caching.
So for example I have a template that allows people to submit a form and the system displays the results in a table, they can do as many as they want and the existing table just adds another row each time, this all works and is called in with the following:
Each row has a remove icon, when clicked it removes the row and recalculates the entries, this works well when removing 1 entry, but after that none are removed unless I cleare the cache on the system then all the ones clicked are removed.
In the latest 2 version everything works as expected but in 3.3 I have the above issue, could anyone advise ?
Just to add the 2 version is in the root and the 3.3 version is on /deploy ( so exactly the same server )
I’m not sure what might cause that within the MODX environment - but might be worth checking if the opcache PHP extension or some other third-party caching system is enabled on your hosting account - especially if you’ve recently changed PHP version.
The page’s cacheable checkbox is unchecked, right?
Have you verified that the pages have cache files in the core/cache/resource/web/resources directory (the filenames will begin with the id of the resource).
opcache is on but the 2 instences of Modx are on the same account, 2 works but 3 doesn’t, both have opcache set to on
No the Page doesnt have cache files which is really strange because clearing the cache removes the element’s once they have been clicked and the page is reloaded, before clearing the cache reloading does nothing.
As I say, the first row clears as it should, the others dont.
Having looked into it further I dont think it is a caching issue, I’ve tested it in the following:
On latest 2 branch
Firefox: Works as expected
Chrome: Works as expected
Safari: Works as expected
On 3.0.3
Firefox: Doesn’t work
Chrome: Works as expected
Safari: Doesnt work
Theres nothing in any of the error logs and dev tools shows the same for both versions
Iv’e requested opcache to be disabled so just waiting for that to happen, no AJAX involved just the page reload and then it calculates the entries again.
I did a test with MODX 3.0.3 using the Firefox browser and this slightly adapted snippet code, but I couldn’t reproduce any issues and everything worked as expected.
Thanks Harry, afraid I can’t edit the code as i’m not great with PHP for one, but this is quite a complex system that is using several snippets that all tie into an API for the calculator that works out interest ect.
It’s just very strange that it works without issue in the latest 2 but not in 3.0.3 for a 2 browsers.