Post by todavy » Tue Jul 20, 2021 4:53 am

OC: 3.0.3.7
Theme: standard
(Extension: Block Products And Pages & Ultimate discounts from Getclear thinking & cookies.ocmod.zip)

When opening a previous modified twig file in Design - Theme editor it restores to default without clicking the Reset button first and all previous changes are lost if clicking Save.

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by Johnathan » Tue Jul 20, 2021 8:27 am

I would highly advise to NOT use the Theme Editor. If you do that then no ocMod files will be able to affect the template files you edit, which means you have to manually add all those edits into the theme-edited versions. It ends up being a lot of work, so given that you're also having other issues, I would recommend just putting the edits into the actual theme files.

If you don't want to do that for some reason, then I haven't heard of this issue, but it may be a bug in 3.0.3.7. Other people can chime in, but you will probably need to hire someone to find a fix if no one else knows the solution.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by todavy » Tue Jul 20, 2021 4:46 pm

Thanks for your answer Johnathan. With "the actual theme files" you mean that I should open the .twig files (for example catalog\view\theme\default\template\product\product.twig) through ftp and change the code with a text editor? Why would that be diffrent from using the Theme Editor? Its still the same file that is beeing changed right? I tryed that once and the change was not visible, perhaps I had to update some cache right after!?

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by JNeuhoff » Tue Jul 20, 2021 5:25 pm

The theme editor stores the changed template in the database, and as pointed by Johnathan, will then ignore OCmod-based changes because OCmod uses the template files from the folder.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by todavy » Tue Jul 20, 2021 5:44 pm

Ok, so I should change the .twig files manually then? But I still don't understand why the twigs restores to default when just opening them in the Theme Editor editor. When I edited and saved them in the Theme editor that change should have been permanent in the database. Where is the Theme Editor getting the default twig code from?

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by JNeuhoff » Tue Jul 20, 2021 6:28 pm

Where is the Theme Editor getting the default twig code from?
It originally gets a twig file from the default theme, from folder catalog/view/theme/default/template, and once the theme editor has done some updates to it, it then stores these in the database and uses it from there.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by todavy » Tue Jul 20, 2021 7:05 pm

Well that contradicts my experienced behavour. After I did some updates in the Theme editor the twig file reflected my change on the frontend, but when I opened it again in the Theme editor it still opened the default twig. So if it got the default twig from the database my updates were never stored in the database when I clicked Save.

New member

Posts

Joined
Tue Jun 10, 2014 5:00 pm

Post by JNeuhoff » Tue Jul 20, 2021 7:35 pm

Check your database table 'oc_theme' via your PHPMyAdmin.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by parkookk » Thu Jul 13, 2023 12:02 am

I have the same issue with OC3038, did anyone mange to fix this issue?

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 81 guests