Page 1 of 3

Opencart 3.0.2.0 default theme doesn't show changes

Posted: Mon Jul 24, 2017 6:17 pm
by frontend1
Hi,
I just installed Opencart 3.0.2.0 in local (XAMPP) and I am trying to edit some part of the code in .twig pages with some code editor. (Notepad++). When I edit and saved changes , refresh Opencart and nothing ...everything stays the same ? I tried to install in and online and click from the admin panel modifications - clear, modify buttons and save changes, clear cache browser and again nothing. When I go to admin panel ... theme editor and I can not preview there my changes on the page why ? I don't want to use all time admin panel edit theme panel because is very small and uncomfortable. I tried to edit default theme .... common ->header.twig and delete for example phone and some small elements. Save the page , refresh the website and nothing reflect on it. With Opencart x2 no problem to make some changes. Now with .twig file I am not sire how to refresh them some ideas ?
Some ideas or help ? Thanks!

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Mon Jul 24, 2017 10:01 pm
by opencartboost
Did you try clear cache in folder storage too?

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Mon Jul 24, 2017 11:29 pm
by JNeuhoff
Normally the twig rendering engine compares the dates of the common/header.twig and its processed cache file to see whether it should update the cache with your changes.

However, if you have also done some changes via the admin backend's Design > Theme Editor it will grab the common/header.twig file from the database and totally ignore any changes elsewhere, e.g. those from view/*/before event handlers or from OCmod based changes. This is a severe issue which I hope Daniel can resolve, see this github entry for more details.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Aug 02, 2017 3:43 pm
by frontend1
opencartboost wrote:
Mon Jul 24, 2017 10:01 pm
Did you try clear cache in folder storage too?
Yes , all time I need to clear all files in this folder. Only this is works fine. It is really slow and stupid way to programming fast and preview changes in the website. Thanks!

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Aug 02, 2017 3:46 pm
by frontend1
JNeuhoff wrote:
Mon Jul 24, 2017 11:29 pm
Normally the twig rendering engine compares the dates of the common/header.twig and its processed cache file to see whether it should update the cache with your changes.

However, if you have also done some changes via the admin backend's Design > Theme Editor it will grab the common/header.twig file from the database and totally ignore any changes elsewhere, e.g. those from view/*/before event handlers or from OCmod based changes. This is a severe issue which I hope Daniel can resolve, see this github entry for more details.
Yes, I got it. I am working only with code editor, it is not possible to work in this small editor in the admin panel. I need years to do something there. Only with clear a cash folder all time. Really unuseful .... is not easy for programmers that 2.x versions

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Aug 02, 2017 5:19 pm
by JNeuhoff
frontend1 wrote:
Wed Aug 02, 2017 3:46 pm
Yes, I got it. I am working only with code editor, it is not possible to work in this small editor in the admin panel. I need years to do something there. Only with clear a cash folder all time. Really unuseful .... is not easy for programmers that 2.x versions
The way it should work is as follows:

In the theme editor, whenever you save your changes, it should also automatically clear the cache.

Also, it should cooperate with other modification systems in OpenCart, in the following order:
  1. Theme Editor
  2. OCmod (including possible Integrated VQmod)
  3. event handlers for view/*/before
  4. VQmod from https://github.com/vqmod/vqmod/releases
  5. Override Engine
  6. event handlers for view/*/after
Also we need support for all the available theme engines for the frontend (e.g. '.tpl' and '.twig' at the moment).

It's not that hard to make it work that way.

When I have time, I'll submit some changes to github for Daniel to review.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Fri Oct 06, 2017 2:21 am
by josuito
Go to the Opencart Dashboard and click on the Gear in top right of the screen, then turn OFF the cache for the Theme, and then Refresh

Done.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Nov 08, 2017 8:12 am
by Dhaupin
@JNeuhoff - Wow, thanks for making that issue report. I hope it is resolved soon.

josuito wrote:
Fri Oct 06, 2017 2:21 am
Go to the Opencart Dashboard and click on the Gear in top right of the screen, then turn OFF the cache for the Theme, and then Refresh
>:D UX Sin 1:
Putting the clear theme and SASS cache in a gear icon in the corner of admin dashboard.

>:D UX Sin 2:
Putting the clear modification cache in a separate area, operating aside from the install/uninstall mechanism as a manual button click.

>:D UX Sin 3:
Not listening to your users for the past 5+ years asking for a concise area to clear caches.

Seriously, what is hard about a cache settings page that it didnt exist through 2.x and now 3.x? Why are cache settings scattered throughout the Admin or not there at all? Do all the OC devs not realize that a huge majority of support issues deal with caching in some way or another?

Make a page in admin for CACHING enable, settings, clears, refreshes, etc. Some examples of what everyone wants in an admin cache area, so everything and its setting is in one place:

- Image Thumb Cache
- Default Storage Cache
- Theme Cache
- SASS Cache
- Browser Cache (yes this exists).
- An EASY way to Ocmod in more settings to this page for other caches such as pagecaches, Cloudflare, etc. A few simple PHP comment targets strings would be great.

Boom.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Nov 08, 2017 3:12 pm
by webmedialdh
Make sure you refresh the developer settings from dashboard of your admin panel
http://prntscr.com/h7nb5f

Regards

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed Mar 21, 2018 5:23 pm
by sajithk123
@webmedialdh Iit worked, Thanx

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Thu Apr 12, 2018 7:50 pm
by ohmashoes
Please help...nothing I do to the theme shows up;
1. I have installed extensions from the marketplace,
2. refresh modification and the blue gear in the dashboard.
3. I have installed op-sharp theme but I am not able to see in the theme editor or the in the settings.

Nothing I do shows up.

What am i doing wrong pls?
I upgraded from 1.5.4 to 3.0.2

Thanks

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Thu Apr 12, 2018 7:54 pm
by straightlight
Ensure to follow those steps from the forum rules: viewtopic.php?f=176&p=718325#p717782 and viewtopic.php?f=176&p=718325#p718325

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Tue May 15, 2018 9:55 pm
by thinks
:) WOW THANKS josuito! I spent literally HOURS making changes in twig files, css file- yet nothing changed. URGH. Brain-draining time. All I wanted to do was to change the background colour of the navbar. AAAAND- using your tip of clearing the cache, WORKED!! WHOO!

Which leads on to the question- WHY have we not got more documentation on this??? I must admit I'm struggling with twig. I much preferred the html/css/templates etc way of doing things- all straightforward, easily located... when I DO have TIME, I'll have to brush up on twig. Anyone have any easy to understand and useful references to twig docs, please??

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Wed May 16, 2018 2:02 am
by sw!tch
thinks wrote:
Tue May 15, 2018 9:55 pm
Which leads on to the question- WHY have we not got more documentation on this??? I must admit I'm struggling with twig. I much preferred the html/css/templates etc way of doing things- all straightforward, easily located... when I DO have TIME, I'll have to brush up on twig. Anyone have any easy to understand and useful references to twig docs, please??
You can google twig cheat sheets some of these are super useful if new to it.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Fri Sep 28, 2018 7:16 pm
by Daniel
the system now grabs the modified files first. but still requires clearing the old template if already saved.

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Tue Jan 01, 2019 5:28 pm
by glolar
Ok,

I've read everything I can find on this problem where twig file changes are not saved.

1. I've done all my editing in the Admin panel's Theme Editor.
2. I've cleared my theme cache and module cache each time after making and saving my changes to the twig files.
3. Re-enter the Admin panel's Theme Editor, and my changes are GONE.

Can someone please shed some light on what I am doing wrong here?

OpenCart 3.0.2.0 default theme.

Thank you in advance!

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Tue Jan 01, 2019 6:02 pm
by xxvirusxx
Edit twig files using a FTP client

viewtopic.php?t=206283

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Sat Jun 13, 2020 9:50 pm
by oc2020
xxvirusxx wrote:
Tue Jan 01, 2019 6:02 pm
Edit twig files using a FTP client

viewtopic.php?t=206283

I'm a little confused about this even after reading several threads in this forum. To my understanding, There are 2 ways of editing twig files:

A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.

Both ways should just changing the file itself and reflect to the site layout without problems, but I noticed the first approach sometimes doesn't work even if I clear all the cache from the admin panel.

Anyone can explain this cache system better? Like how can I clear all the cache manually from a certain cache folder so I can immediately see my changes?

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Sat Jun 13, 2020 10:55 pm
by xxvirusxx
oc2020 wrote:
Sat Jun 13, 2020 9:50 pm
A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.
A. Refresh ocmod, Clear theme cache, SASS cache (or disable both)
B. Ignore

Re: Opencart 3.0.2.0 default theme doesn't show changes

Posted: Sun Jun 14, 2020 12:48 am
by oc2020
xxvirusxx wrote:
Sat Jun 13, 2020 10:55 pm
oc2020 wrote:
Sat Jun 13, 2020 9:50 pm
A. Use any external editor to change the ". twig" files and upload to the site via FTP

B. Use theme editor from opencart admin panel to edit and save.
A. Refresh ocmod, Clear theme cache, SASS cache (or disable both)
B. Ignore

As I said, your solution doesn't work.