Jump to content

Email Templates HTML encoding & save issue


Recommended Posts

Hallo everybody sorry for my poor english for start! :)

 

i have started my new eshop and i have a problem with the email templates i have tested them more times tried everything in the forums but still not working the email for example from the contact form that will send, there is the logo attached to the email the shop link is not working and the logo on the top of the email isnt embedded neither the link to the website.

 

on back office the tinymce editor isnt saving the tags like {shop_url} after the save they are looking like that %7Bshop_url%7D.

 

Thank you very much for your time i will attache some screenshots where i have marked the issues.

 

i am using prestashop 1.6.0.14 and the default theme.

post-856046-0-91226100-1425833017_thumb.png

post-856046-0-14248200-1425833019_thumb.png

Link to comment
Share on other sites

Are they saved properly if you edit the html version directly? Or always get encoded?

 

Hallo Nemo1 thank you for the replay. yes it always get encoded if i change the html after the save the tags from the image and the url are get encoded but other tags in same line and all the others work properly only this in header and footer and the logo attached to email.  

Link to comment
Share on other sites

you could test if purify html is creating this issue by disabling it.  use back office search or google to learn how to disable from back office.

 

Thank you very much El Patron it wroked you are amazing THANK YOU!!!! everything works fine now but there is now the fact that every email template i saved with wrong html i have to change everything back to the "{}"  and i have 3 languages so its lot of email templates. Is there any way to do it quicker?

Link to comment
Share on other sites

Guest Kaylabs

I can confirm what El patron said , it was working in 1.6.0.9, not anymore since: It's htmlpurifier causing this issue. This bug has been introduced on 12 nov 2014 on github.

 

The faulty line is 1631 there https://github.com/PrestaShop/PrestaShop/blob/1.6/controllers/admin/AdminTranslationsController.php#L1631

 

I've reported this problem in french forum, prestateam said they are working on it (for reference the french thread https://www.prestashop.com/forums/topic/418700-htmlpurifier-et-mails-boutiques-en-16011-gros-bug/)

Edited by Kaylabs (see edit history)
Link to comment
Share on other sites

So i have to edit every email template to bring it as it was? Will somebody answer me if there is a way to restore the {} charachters without to lose my tranlations and not to have to chnage them one by one because i have 3 languages on my site!

Link to comment
Share on other sites

You can try to deactivate htmlpurifier in back-office, edit one mail and save, this should save all emails with correct urls

 

 

If not, as it concerns only links href="{....}" you should also be able to do it with search and replace throughout all emails.

 

search "%7B replace by "{

search %7D" replace by }"

 

 

Just save all emails before ;)

 

It worked! everything is working fine now thank you very much for your help Kaylabs and everybody! I have replaced them all with search and uploaded the email template files.

Link to comment
Share on other sites

Hello,

 

I have same problem. I deactivated: HTML purifier but it still persist. I managed to bring back logo to email replacing url and wrote there {shop_logo}. Other links in email are not active. I tried to reaplacing %7B to %7D but that didnt help. 

Any other ideas?

Thank you.

 

EDIT: ok, I found out that every %7B should be replaced with {}. That should do the work. If you know faster way I´ d appreciate it.

Edited by Lazer17 (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

 If you know faster way I´ d appreciate it.

 

 

Hi there.

 I download all the directories that could have email templates in it and then with the program notepad++ i use the function "replace in files"  and i replace

%7B  with  {  

and

%7D   with  }

 

after these i upload the directories back on the site

 

P.S. when i download and upload,  i compress the folders to go much quicker.

Link to comment
Share on other sites

×
×
  • Create New...