0

Got some really strange behaviour with Magento 2.2.8.

Seems like the cache (using Magento built in cache) and site environment settings are locked and will not change.

I have disabled caching through env.php, cache:status confirms all caches are off, but admin Cache Management screen says all enabled (apart from one previously disabled).

Have changed to developer mode using CLI, and manually changing in env.php, but developer tools do not show in admin.

Weirdest of all, trying to update template files in a custom module. I have uploaded a new version of the phtml file and run the usual commands:

rm -rf pub/static/* generated/* var/cache/* var/view_preprocessed/* var/page_cache/*

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento setup:static-content:deploy -f

bin/magento cache:flush

bin/magento cache:clean

Granted, some of these steps shouldn't be required when in developer mode, but since Magento is lying and telling me it's in dev mode, but behaving like it's in production this seems to be the only way.

Sure enough, my template updated. I had to make some further changes, so uploaded another version of the template, ran through the process as before. This time no update to output when testing. Eliminate browser caching by using Incognito mode, different browser, even loading on another computer, still no change.

This behaviour has been going on for a while.

The site is a test clone of a production site. So decided to re-clone. Production site has never had either of the updated templates applied.

After re-cloning site (complete delete and re-copy from production site) the first updated page is still being displayed on browser. The code for this is not even in the template that is on the server.

Any one have an answer for why this is and how to fix?

  • do you have varnish? have you tried to clean php opcache? – MagenX Sep 4 at 8:21
  • We have had varnish before, but this has been disabled and purged. Have also created a script for cleaning opcache, but still no difference. – user3867548 Sep 4 at 8:58
  • Interestingly. Having performed 2 more runs of the process outlined in my OP, the admin area cache management page is now showing the cache types as being disabled. – user3867548 Sep 4 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.