Page 1 of 1

Suddenly, changes don't apply, old template loaded.

Posted: Tue Oct 03, 2017 4:07 am
by tjonnyc
Having an interesting problem. I was making changes to the template last night, and everything was working fine... until suddenly it didn't.
Changes I was making to the template category.twig were just not showing up.
I cleared the Journal Cache, Theme Cache, SASS Cache, and browser cache. Nothing.
I can get the file from FTP, I can make changes to it, I can re-upload it by FTP, and I can see that the changes were made.
But the actual page is still reading some old version of category.twig

According to tech support, the problem could be that the /ocartdata/ folder is located OUTSIDE of /public_html/, and somehow either OpenCart, or Journal2, or one of the extensions, cannot write to it.

Has anyone run into this problem before (changes to template not showing up all of a sudden), and if so, what did you do to resolve it?

Re: Suddenly, changes don't apply, old template loaded.

Posted: Tue Oct 03, 2017 4:08 am
by tjonnyc
Also, what happens if you just straight up delete the files in /ocartdata/storage/cache/?

Re: Suddenly, changes don't apply, old template loaded.

Posted: Tue Oct 03, 2017 8:19 am
by straightlight
Since you're using the Journal2 theme, I would suggest to contact the theme developer of that extension to get this issue resolved. One way you could test if there are similar results would be by switching back to the default theme. If the results can't be reproduced, then it would be an issue with the Journal2 theme.

Re: Suddenly, changes don't apply, old template loaded.

Posted: Fri Nov 24, 2017 9:27 pm
by Micas
Hi,
Did you manage to resolve this issue? I seem to be getting a similar problem.
I'm using the default theme on opencart 3.0.2 and I have edited the /admin/view/template/sale/order_invoice.twig so that it doesn't show the phone number on the invoice printout but no changes are taking effect?
The only place I can think that opencart can now be storing a copy of the file is in the /ocartdata/storage/cache/ ....but I don't know if it is save to delete the cache folders or not?
Any help from anyone would be much appreciated :)

Re: Suddenly, changes don't apply, old template loaded.

Posted: Fri Nov 24, 2017 10:11 pm
by straightlight
You need to clear all caches from the admin dashboard (blue icon on the top right) and from your admin - > extensions - > modifications - > refresh button when making changes to the TWIG files.

Re: Suddenly, changes don't apply, old template loaded.

Posted: Wed Nov 13, 2024 7:08 am
by sajuk
Searching to find answers to the same problem, cleared all the cache, modification, cleared theme cache, still no joy,,

I know there is some cache issue, as i tested the site by simply renaming the header.twig but the site still loads and works fine, should see an error file not found,
which means it is loading the file an old version of the site from somewhere.

Re: Suddenly, changes don't apply, old template loaded.

Posted: Wed Nov 13, 2024 7:19 am
by sajuk
I think i Found the issue..for me anyway,,
check if the file is in -> Design -> Theme editor ->
if it is there delete it (red button)
go to website front end refresh (f5) page and it should work with the new changes

Re: Suddenly, changes don't apply, old template loaded.

Posted: Wed Nov 13, 2024 6:30 pm
by JNeuhoff
This thread is 7 years old, and the original poster was using the old Journal2 framework, not a proper OpenCart. But you are right, don't use the theme editor and OCmod-based modification at the same time, they might clash with each other.