Post by none » Sat Mar 20, 2021 3:46 pm

Hi,

Ive got Opencart 3.0.3.7 installed. My problem is that I apply changes to twig files from within Opencart admin but after a day or two they keep rolling back to the original state like I never did anything. Why is it or how can I prevent this? It is very annoying.

I removed "addthis"" script like 5 times + other things. 2 days later social buttons are back again. Why?

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by xxvirusxx » Sat Mar 20, 2021 4:32 pm

none wrote:
Sat Mar 20, 2021 3:46 pm
I removed "addthis"" script like 5 times + other things. 2 days later social buttons are back again. Why?
Removed from what file?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by none » Sat Mar 20, 2021 4:40 pm

product.twig

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by xxvirusxx » Sat Mar 20, 2021 4:44 pm

From theme?

Code: Select all

catalog\view\theme\default\template\product\product.twig
or from storage modification?

Edited how? From admin or using an text editor?

More details...

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by none » Sat Mar 20, 2021 4:52 pm

I used Opencart Design / Theme editor.

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by xxvirusxx » Sat Mar 20, 2021 4:54 pm

none wrote:
Sat Mar 20, 2021 4:52 pm
I used Opencart Design / Theme editor.
Forget about that s....t :laugh: :laugh:

Edit the file directly with an text editor or from Cpanel, then refresh ocmod modifications, clear theme cache and SASS cache.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by OSWorX » Sat Mar 20, 2021 4:59 pm

xxvirusxx wrote:
Sat Mar 20, 2021 4:54 pm
none wrote:
Sat Mar 20, 2021 4:52 pm
I used Opencart Design / Theme editor.
Forget about that s....t
And why is this s...t ? ? !
When you post such nonsens, write also why .. otherwise such postings are no benefit and useless.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by xxvirusxx » Sat Mar 20, 2021 5:01 pm

OSWorX wrote:
Sat Mar 20, 2021 4:59 pm
And why is this s...t ? ? !
Because it is useless.
If is not useless for you, then you can use it :)

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by none » Sat Mar 20, 2021 5:05 pm

I dont know if this is nonsense or not. In fact there is a "design editor" has been built in into Opencart which doesnt seem to work. My question is also why this has been added to Opencart 3 if it does not work or if it has not been toughly tested. I found a "fix" but from the developer's description it is still unclear if this is a fix to the same problem or to some other TWIG modification issues.
https://www.opencart.com/index.php?rout ... twig%20fix
It is sad that third party developers have to make patches to Opencart system.
If I was doing something wrong then I would like to know what and why so I can avoid this problem.

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by OSWorX » Sat Mar 20, 2021 6:45 pm

xxvirusxx wrote:
Sat Mar 20, 2021 5:01 pm
OSWorX wrote:
Sat Mar 20, 2021 4:59 pm
And why is this s...t ? ? !
Because it is useless.
If is not useless for you, then you can use it :)
Well, pretty straight answer.
And again: useless.

Why?
You won't give an answer why the Theme Editor is s***t, so better don't answer in future.

And to elaborate this "thing" a bit: not the editor is s***t, the answers are s***t.
Because the "bug" is not inside the editor, more inside the file and functions how the TWIG engine is initialized and handled.
And to close this thread: this bug has been discussed several times - here and at Github.
And has also a fix - see more in 2nd answer below.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OSWorX » Sat Mar 20, 2021 6:58 pm

none wrote:
Sat Mar 20, 2021 5:05 pm
I dont know if this is nonsense or not. In fact there is a "design editor" has been built in into Opencart which doesnt seem to work. My question is also why this has been added to Opencart 3 if it does not work or if it has not been toughly tested. I found a "fix" but from the developer's description it is still unclear if this is a fix to the same problem or to some other TWIG modification issues.
https://www.opencart.com/index.php?rout ... twig%20fix
It is sad that third party developers have to make patches to Opencart system.
If I was doing something wrong then I would like to know what and why so I can avoid this problem.
See previous answer about the theme editor!
And regarding this "fix" and this "developer": he is simply copying and paste others work - see this for example:
https://github.com/opencart/opencart/bl ... cation.xml

And more:
https://github.com/opencart/opencart/issues/8867
https://github.com/opencart/opencart/co ... e3dd68e019
viewtopic.php?f=202&t=221131&p=806104#p806095

Fact is, that OC releases are published with a bug not handling templates correct - correct that this is a shame.
But this bug has been solved a long time ago.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by none » Sun Mar 21, 2021 2:05 am

Thanks for the input. Unfortunately replacing the modification.xml did NOT work.
I removed again wishlist, comparison buttons and "addthis" social script from the TWIG files and 2 hours later they are back again in the template.
Extremely annoying.

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by sw!tch » Sun Mar 21, 2021 5:47 am

In phpMyAdmin go to oc_theme table do you have an entires there, also note the date_added ?

This could also be cache, link to site?

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by none » Mon Mar 22, 2021 5:40 pm

Hi,

blueberry - common/header - "<!DOCTYPE html> etc etc" - "2021-03-21 06:57:50"

Dates are there an seem to update the date when I apply a change. They still roll back after 1-2 hours.
In Opencart config "file" cache is there. Now despite the fact that I edited the twig files on the hosting the database seems to store a different version. What is the appropriate way to update the database stored version?

New member

Posts

Joined
Wed Sep 09, 2009 3:53 am

Post by paulfeakins » Mon Mar 22, 2021 5:44 pm

none wrote:
Sat Mar 20, 2021 5:05 pm
I dont know if this is nonsense or not. In fact there is a "design editor" has been built in into Opencart which doesnt seem to work. My question is also why this has been added to Opencart 3 if it does not work or if it has not been toughly tested.
Search the forum and you'll find plenty of discussion about this but the summary, as others have said, is don't use it.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 263 guests