Jump to content

[SOLVED - UPDATED 15/07/2015] Email templates url broken after editing (%7B, %7D) - Easy fix added!


Recommended Posts

  • 2 weeks later...

Thanks for this solution ;)

 

Fast two-liner solution if you are lazy and olso have linux shell access:

 

1. Copy /themes/THEME_DIR/mails/LANGUAGE_DIR/ to other localisation (for backup if sth goes wrong case).

2. Execute two lines:

 

for i in `ls |grep 'html'`; do echo "Repair: $i" && sed -i "s/%7B/{/g" $i && echo -ne " -DONE- \n"; done
for i in `ls |grep 'html'`; do echo "Repair: $i" && sed -i "s/%7D/}/g" $i && echo -ne " -DONE- \n"; done
 
Replace all %7B to { and %7D to } marks.
 
3. Copy with overriding current .html files.
Edited by efrenzy (see edit history)
  • Like 2
Link to comment
Share on other sites

I have created account especially to thank to Crezzur. I spent over 3 hours fighting with the issue and only thing I figured out was to to add redundant %7Bkeys%7D => values pairs to template_vars table.

 

Your investigation togheter with  sed -i "s/%7D/}/g" ./* in mails html templates diretory is much better.

 

Job done smoothly ! Take care

  • Like 1
Link to comment
Share on other sites

Hey all,

 

I noticed several people are having issue's when translating templates the url's become broken.

the brackets " { " and " } " are replaced by %7B and %7D.

 

After a small search i have found what the issue is.

I have added a patch for this and going to share it with you guys since it will take a while when there will come a new update for prestashop (i guess).

 

YOUR_WEBSITE_ROOT/controllers/admin/AdminTranslationsController.php

 

Search for:

file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content));

Replace that line with:

file_put_contents($path.$mail_name.'.'.$type_content, $content);

Note: after adding this change you have to replace %7B and %7D. with " { " and " } " (Now they wont change anymore!)

 

Enjoy!

 

And like this post if it helped you so other people can find this fix.

 

Bugreport: http://forge.prestashop.com/browse/PSCSX-4594?jql=

 

 

i didnt have this problem on 1.6.0.9,its fixed for 1.6.0.13 ? do you know anything about it?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi Crezzur, 

where i can found this: YOUR_WEBSITE_ROOT/controllers/admin/AdminTranslationsController.php.

I have prestashop cloud with ftp account but by FileZilla i can't find these directory.

I have this problem in the emails...there are no shop's logo (it's as attached file) and the links in the email don't work.

Thanks for your help.

 

 

P.S. i tried to modify something in the email by my BO of prestashop and it delete me all EN folders about the emails.

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

This fix works, did you replace all %7B to { and %7D to } marks.

example:

%7Bweburl%7D change to  {weburl}

 

post your page code here so i can thake a look if you did it right if it still doesnt work

 

do I have to manually replace it on each email? because I didn't do that..

I have just updated the AdminTranslationsController.php file and have replaced classes/Tools.php files

 

my website is www.pandabanana.com.br

what do you need to access the code?

Link to comment
Share on other sites

do I have to manually replace it on each email? because I didn't do that..

I have just updated the AdminTranslationsController.php file and have replaced classes/Tools.php files

 

my website is www.pandabanana.com.br

what do you need to access the code?

yes or delete the translated files in your theme folder

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Big tip for those who struggle to replace %7B and %7D with  brackets { } (respectively) in every email template:

download any freeware enchanced txt editor (I used Notepad++ for example),

go to ../themes/[TEMPLATE NAME]/mails/[the language folder in which links don't work]/   ,

download all html file templates to separate folder,

MAKE BACKUP OF IT!

select html file templates (CTRL + A?) and open with the txt editor

use "replace with..." function to replace "%7B" with "{" and then "%7D" with "}".

Save all files,

Upload edited files to the very same folder they were picked from.

 

 

all this process takes around 2-3 minutes to complete - fast, easy and most important - you will avoid missing some bracket somewhere.

  • Like 3
Link to comment
Share on other sites

Big tip for those who struggle to replace %7B and %7D with  brackets { } (respectively) in every email template:

download any freeware enchanced txt editor (I used Notepad++ for example),

go to ../themes/[TEMPLATE NAME]/mails/[the language folder in which links don't work]/   ,

download all html file templates to separate folder,

MAKE BACKUP OF IT!

select html file templates (CTRL + A?) and open with the txt editor

use "replace with..." function to replace "%7B" with "{" and then "%7D" with "}".

Save all files,

Upload edited files to the very same folder they were picked from.

 

 

all this process takes around 2-3 minutes to complete - fast, easy and most important - you will avoid missing some bracket somewhere.

 

Well explained ;)

Link to comment
Share on other sites

I'm not sure if anyone else encountered this, not only does it alter the "{" and "}" upon editing, but In my experience tonight, it also removed the style of the template.

 

My default mail themes had this style:

<style>	@media only screen and (max-width: 300px){ 
				body {
					width:218px !important;
					margin:auto !important;
				}
				.table {width:195px !important;margin:auto !important;}
				.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto !important;display: block !important;}		
				span.title{font-size:20px !important;line-height: 23px !important}
				span.subtitle{font-size: 14px !important;line-height: 18px !important;padding-top:10px !important;display:block !important;}		
				td.box p{font-size: 12px !important;font-weight: bold !important;}
				.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr { 
					display: block !important; 
				}
				.table-recap{width: 200px!important;}
				.table-recap tr td, .conf_body td{text-align:center !important;}	
				.address{display: block !important;margin-bottom: 10px !important;}
				.space_address{display: none !important;}	
			}
	@media only screen and (min-width: 301px) and (max-width: 500px) { 
				body {width:308px!important;margin:auto!important;}
				.table {width:285px!important;margin:auto!important;}	
				.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}	
				.table-recap table, .table-recap thead, .table-recap tbody, .table-recap th, .table-recap td, .table-recap tr { 
					display: block !important; 
				}
				.table-recap{width: 295px !important;}
				.table-recap tr td, .conf_body td{text-align:center !important;}
				
			}
	@media only screen and (min-width: 501px) and (max-width: 768px) {
				body {width:478px!important;margin:auto!important;}
				.table {width:450px!important;margin:auto!important;}	
				.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}			
			}
	@media only screen and (max-device-width: 480px) { 
				body {width:308px!important;margin:auto!important;}
				.table {width:285px;margin:auto!important;}	
				.logo, .titleblock, .linkbelow, .box, .footer, .space_footer{width:auto!important;display: block!important;}
				
				.table-recap{width: 295px!important;}
				.table-recap tr td, .conf_body td{text-align:center!important;}	
				.address{display: block !important;margin-bottom: 10px !important;}
				.space_address{display: none !important;}	
			}
</style>

After BO editing, this style was removed.

 

At the moment, In my (Greenhorn) opinion, stay away from back office editing of Email templates, editing the actual files in Notepad++ will guarentee you get the result your looking for.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

You are right. This might fix this for next release. https://github.com/PrestaShop/PrestaShop/pull/3061/files

 

Regards

 

Yeah already noticed the bug report is been marked als solved (http://forge.prestashop.com/browse/PSCSX-4594?jql=)

https://github.com/PrestaShop/PrestaShop/pull/2728/files

 

The fix is already implemented in 1.6.0.14 so the only version having this issue schould be 1.6.0.9

Hi friends, I'm having that problem again...

 

Using prestashop 1.6.0.11 the changes I make are simply not sticking... can anyone please help?

My links are still broken

It schould work the files cant change by it self as far as i know.

Link to comment
Share on other sites

 

Yeah already noticed the bug report is been marked als solved (http://forge.prestas...PSCSX-4594?jql=)

https://github.com/P...pull/2728/files

 

The fix is already implemented in 1.6.0.14 so the only version having this issue schould be 1.6.0.9

 

I've experienced broken url's and the style being removed on a fresh 1.6.0.14 install, so if it was fixed in 1.6.0.14, im at a loss.

Link to comment
Share on other sites

hey guys , i already figured out this problem. please go to /themes/default-bootstrap/mails/en and then replace all%7D and %7B to { }. and same in mail alert module. that is resolve. i was changing those codes to main mail folder. which i think many of us are replacing those codes to Mail folder which is not in the theme. if any question please post it . i can send you detail information

Link to comment
Share on other sites

Yeah already noticed the bug report is been marked als solved (http://forge.prestashop.com/browse/PSCSX-4594?jql=)

https://github.com/PrestaShop/PrestaShop/pull/2728/files

 

The fix is already implemented in 1.6.0.14 so the only version having this issue schould be 1.6.0.9

It schould work the files cant change by it self as far as i know.

 

Hi,
 
I replaced that line file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content, array('{', '}')));
 
then I changed classes/Tools.php and controllers/admin/AdminTranslationsController.php files as they were saying here (https://github.com/PrestaShop/PrestaShop/pull/2728/files)
 
I'm unable to change the tools/htmlpurifier/HTMLPurifier.standalone.php file, every time I try to, my website goes offline.
 
With all previous changes I still can't make the url brackets to work, still don't know what is going on in that case. In my older prestashop install those changes worked for me... not it doesn't...
 
 
EDIT: I managed to change the tools/htmlpurifier/HTMLPurifier.standalone.php
 
and now things seem to work fine, thank you for your reply anyway! 
Edited by technico2006 (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi,

 

All my links are broken too.

 

The first answer I saw was to replace the %7B and D by "{" and "}". I changed every mails (sooo long), but for nothing...

 

Then I made the change in the Translation Controller, but it still does not work, the %7 comes again and again.

 

 

The problem is the same with the logo (see attachement) : I don't see it, and the code is still wrong. 

 

I tried also to make the change in the core email templates.

 

 

Do you know what I'm missing ? Thanks a lot in advance !

 

ETA : I'm in 1.6.0.14

post-1003114-0-61364900-1432992116_thumb.jpg

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

 

Hi,
 
I replaced that line file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content, array('{', '}')));
 
then I changed classes/Tools.php and controllers/admin/AdminTranslationsController.php files as they were saying here (https://github.com/PrestaShop/PrestaShop/pull/2728/files)
 
I'm unable to change the tools/htmlpurifier/HTMLPurifier.standalone.php file, every time I try to, my website goes offline.
 
With all previous changes I still can't make the url brackets to work, still don't know what is going on in that case. In my older prestashop install those changes worked for me... not it doesn't...
 
 
EDIT: I managed to change the tools/htmlpurifier/HTMLPurifier.standalone.php
 
and now things seem to work fine, thank you for your reply anyway! 

 

 

I missed the change proposed by technico2006, I made it, now it works ! I'm relieved :)

 

I just have to change (again !) all the %7B and %7D, but it seems it is the last time.

 

Thanks to the community help !

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Bonjour à tous et merci à Crezzur pour la résolution de ce petit problème.

 

Petite astuce pour modifier ensuite massivement tous les fichiers mails :

 

Avec Filezilla (ou autre logiciel ftp), télécharger tous les fichiers html du dossier /theme/mail/fr dans un dossier sur votre ordinateur

 

Avec Notepad+, faire CTRL+F et allez dans l'onglet "Rechercher dans les fichiers d'un dossier". Spécifiez le dossier où vous avez téléchargé les fichiers html et faites la recherche %7B à remplacer par { et cliquez sur "Remplacer tout".

Faites de même pour %7D par }

 

Tous les fichiers seront modifiés, il n'y a plus qu'à les remettre sur votre FTP. L'opération prends 30 sec. :)

  • Like 2
Link to comment
Share on other sites

Hi,

         This solution only works with Prestashop emails, not for Modules. Modules Emails is getting this error =(  I'm using 1.6.0.14

 

I suppose you'll just have to do the same within the module mail directories. 

Link to comment
Share on other sites

  • 2 weeks later...

I am a novice here but I think/thought I understood what I needed to do.

 

I Updated the 3 different php files. Modified just the test.html email originally via the translator area (using notepad++ then uploaded via ftp).  Now when I go to send a test email, I get an error to "check my configuration."  My updated test email has the standard header and footer of the other emails.

 

The email still sends, but no header or footer on the test email at all.  I don't even see the oversized "Hello".  Just the "This is a test email, if...."

 

I edited the order_confirm email to be brackets "{ }" but it still delivered with the %7.

If I go in as if I wanted to edit the html file in prestashop, Viewing the email shows %7 but html edit, when I go to edit the link is shows as {shop_url}

 

Version 1.6.0.14, with the default bootstrap theme installed using the 1 click install by the host.  The email issue is the last thing I am trying to sort out before it goes live.

 

Restored the tool.php to original and the error goes away on sending a test email but of course I still do not have clickable links.

 

Edit: I was able to edit the "send to a friend" with all of the 3 php modules updated and it worked. but now I get an error when  adding anything to the shopping cart.

 

Final edit (I hope): I don't know what HTMLPurifier_standalone.php modification is supposed to do, but with it, my site crashes. So far it looks like just the 2 mods fixed my issue.

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

  • 2 weeks later...

if i understood correctly, it can't be solved if you use prestashop CLOUD....

so we need to wait until we get a update....correct?

juweeltje

Update:  I have made a video which explains how you can easly fix this error for cloud and self hosted presta webshops.

 

You are not able to access the sub-map your_store_url/Classes/,

therefore you cannot apply the update for cloud hosted web-shops.

 

You will have to be patience and wait for the cloud store to upgrade.

I am a novice here but I think/thought I understood what I needed to do.

 

I Updated the 3 different php files. Modified just the test.html email originally via the translator area (using notepad++ then uploaded via ftp).  Now when I go to send a test email, I get an error to "check my configuration."  My updated test email has the standard header and footer of the other emails.

 

The email still sends, but no header or footer on the test email at all.  I don't even see the oversized "Hello".  Just the "This is a test email, if...."

 

I edited the order_confirm email to be brackets "{ }" but it still delivered with the %7.

If I go in as if I wanted to edit the html file in prestashop, Viewing the email shows %7 but html edit, when I go to edit the link is shows as {shop_url}

 

Version 1.6.0.14, with the default bootstrap theme installed using the 1 click install by the host.  The email issue is the last thing I am trying to sort out before it goes live.

 

Restored the tool.php to original and the error goes away on sending a test email but of course I still do not have clickable links.

 

Edit: I was able to edit the "send to a friend" with all of the 3 php modules updated and it worked. but now I get an error when  adding anything to the shopping cart.

 

Final edit (I hope): I don't know what HTMLPurifier_standalone.php modification is supposed to do, but with it, my site crashes. So far it looks like just the 2 mods fixed my issue.

 

Can you post a printscreen of your e-mail editor, and the e-mail you receive.

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

  • 2 weeks later...

Crezzur,

 

it works , even with the could version....exept, one.....; the "Shipped" mail...; even when i change  it to }.... is keeps geving me the b7% .

Al the rest works fine now

 

I have just tested "Core emails" -> "shipped" on a clean install of the prestashop version 1.6.0.9 with my solution added and i have no problems changing the brackets of this template without braking the template. are you sure you have replaced the %7b with brackets in that template ?

Link to comment
Share on other sites

The problem is that the editor of email templates (the famous TinyMCE), when you edit a link, always replaced in the URL field the characters "{" and "}" to "% 7B" and "% 7D" for hard you try, and always travels URL link wrong because it is not the variable to put the correct URL.

 

The trick is 100% reliable to solve it and that I have solved my problem is this.

 

All email templates are HTML files in the "mail" folder of your template and generic Prestashop. Also you find this folder on the modules that are associated sending emails. Well, like HTML files without more, you can edit them there for not using TinyMCE editor. There you can successfully create URLs of the links, putting well the characters "{" and "}". Then save changes and upload the html file via FTP, substituting there. So, you get to leave the HTML file you want and well done.
Link to comment
Share on other sites

Could you send me a login for you backoffice so i can thale a quick look ?

 

 

The problem is that the editor of email templates (the famous TinyMCE), when you edit a link, always replaced in the URL field the characters "{" and "}" to "% 7B" and "% 7D" for hard you try, and always travels URL link wrong because it is not the variable to put the correct URL.
 
The trick is 100% reliable to solve it and that I have solved my problem is this.
 
All email templates are HTML files in the "mail" folder of your template and generic Prestashop. Also you find this folder on the modules that are associated sending emails. Well, like HTML files without more, you can edit them there for not using TinyMCE editor. There you can successfully create URLs of the links, putting well the characters "{" and "}". Then save changes and upload the html file via FTP, substituting there. So, you get to leave the HTML file you want and well done.

 

 

Well,

when i download the "shipped.html" file from FTP, i do see my "followup" link correctly whit {} en no % , but still it dosn't work

 

6fxmvc.jpg

Link to comment
Share on other sites

Hi,

Is there any way to do same with "core emails" ??

 

Though i have edited templates manually , still struggle to enable hyper link for new password generation url & coustomer message reply link in emails sent to coustomer .

 

Also i use version 1,6.0.14 & uploading  file AdminTranslationsController is diabling my translations tab from localization menu (back panel of prestashop)  i.e when i click translations tab after uploading the file i see blank white page .]

 

Any help is appriciated . :rolleyes:

Link to comment
Share on other sites

Hi Crezzur,

 

thanks for the solution, but in our case it didn't work. I copied the PHP in the folder /ULR/controllers/admin but afterwards I can't open the translation side in the backoffice of prestashop (version 1.6.014). Just a white screen. So I need to reverse the chances.

What went wrong?

 

Kind regards

Frank

Hey all,

 

I noticed several people are having issue's when translating or editing templates the url's in the edited e-mail template are broken.

When you edited a template url brackets " { " and " } " are replaced by %7B and %7D.

 

Example: {weburl} changes to %7Bweburl%7D

 

How to solve this problem? (Updated 15/07/2015)

(This fix works also for cloud based web-shops!)

 

Watch this video for the steps: https://www.youtube.com/watch?v=nwb050tdyfM

File used in video: attachicon.gifAdminTranslationsController.php

 

IMPORTANT NOTE:  after adding this file you have to replace %7B and %7D. with " { " and " } " (Now they wont change anymore!)

Please check every e-mail template you have an issue with that the bracket are not changed.

 

Please note: Issue should disappear with newest version of prestashop: http://forge.prestashop.com/browse/PSCSX-4594?jql=

 

Enjoy your prestashop!

~ Crezzur ~

 

PS: Don't forget to like my post if this topic has solved your issue ;)

Link to comment
Share on other sites

Hi all,

 

I used the technique proposed by Crezzur in the youtube video with the override file and it did not work as no matter how hard you try, the %7B url %7D/ would always come back in the email templates.

 

Then I used the other technique:

YOUR_WEBSITE_ROOT/controllers/admin/AdminTranslationsController.php
 
Search for:
file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content));
Replace that line with:
file_put_contents($path.$mail_name.'.'.$type_content, $content);
Note: after adding this change you have to replace %7B and %7D. with " { " and " } " (Now they wont change anymore!)

This time it worked well for the permanent replacement of  %7B and %7D with " { " and " } "

 

However, my shop logo still looks as a broken link in all received emails so that doesnt really help me much and now I still don't have a clue how to fix it :(

 

PS 1.6.0.14

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

Edit:


 


In classes/Mail.php


 


Replace


  1. if (isset($logo))
  2. $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo)));

By :


  1. if (isset($logo))
  2. $template_vars['{shop_logo}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'img/'.Configuration::get('PS_LOGO', null, null, $id_shop);

 


Your logo won't be in attachement anymore and will be in the header of the emails. After that you still need to replace manually all the %7B and %7D with " { " and " } " in the email templates.


 


So if anyone has a trick for a quick mass edit I am up for it


 


Cheers !


Link to comment
Share on other sites

Hi all,

 

I used the technique proposed by Crezzur in the youtube video with the override file and it did not work as no matter how hard you try, the %7B url %7D/ would always come back in the email templates.

 

Then I used the other technique:

 

YOUR_WEBSITE_ROOT/controllers/admin/AdminTranslationsController.php
 
Search for:
file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content));
Replace that line with:
file_put_contents($path.$mail_name.'.'.$type_content, $content);
Note: after adding this change you have to replace %7B and %7D. with " { " and " } " (Now they wont change anymore!)
This time it worked well for the permanent replacement of  %7B and %7D with " { " and " } "

 

However, my shop logo still looks as a broken link in all received emails so that doesnt really help me much and now I still don't have a clue how to fix it :(

 

PS 1.6.0.14

Did you clear your cache after my suggested fix ?

Link to comment
Share on other sites

I did that and it didn't fix my problem, Email links are still not working...can you help?

 

I know this might be coming a little bit late but I still felt I should post it as I have been battling this problem for over 3 months now. Tried the fix above to no avail. I actually thought I have replaced all the %7B and %7D until moments ago when I accidentally looked at the "image" link on the "Edit HTML version" tab of the email templates and realised that the "{" and "}" have also been replaced with %7B and %7D. I changed these back to the normal "{" and "}" and bingo - problem solved.

 

I am so happy.

 

Thanks to all contributors. 

Link to comment
Share on other sites

MilkSheikh,

 

Thank you VERY MUCH! You helped me a lot! This works for me:

 

YOUR_WEBSITE_ROOT/controllers/admin/AdminTranslationsController.php

Search for:
file_put_contents($path.$mail_name.'.'.$type_content, Tools::purifyHTML($content));
Replace that line with:
file_put_contents($path.$mail_name.'.'.$type_content, $content);
Note: after adding this change you have to replace %7B and %7D. with " { " and " } " (Now they wont change anymore!)

  • Like 1
Link to comment
Share on other sites

Did you try that for logo in attachement ? It worked for me:

 

In classes/Mail.php

 

Replace

  1. if (isset($logo))
  2. $template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null,ImageManager::getMimeTypeByExtension($logo)));

By :

  1. if (isset($logo))
  2. $template_vars['{shop_logo}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'img/'.Configuration::get('PS_LOGO', null, null, $id_shop);
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...

Hi there,

 

i have a problem with this solution...

 

i am on prestashop version 1.6.0.11

 

And i downloaded the AdminTranslationsController.php, i put it in the right folder under my ftp...

 

But now when i click on "Edit the HTML version" on my mail, it's like that :

 

1445199829-capture.jpg

 

I'm not able to Display mails in html format....

 

What can i do to be able to see the HTML format again ?

 

Thank you.

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

Hi there,

 

i have a problem with this solution...

 

i am on prestashop version 1.6.0.11

 

And i downloaded the AdminTranslationsController.php, i put it in the right folder under my ftp...

 

But now when i click on "Edit the HTML version" on my mail, it's like that :

 

1445199829-capture.jpg

 

I'm not able to Display mails in html format....

 

What can i do to be able to see the HTML format again ?

 

Thank you.

 

Send me your original AdminTranslationsController.php

 

located here -> yourwebshop/controllers/admin/AdminTranslationsController.php

 

I will make a custom override for you and see if this works.

Link to comment
Share on other sites

  • 4 weeks later...

hi i hope someone could help me on this issue, i went to BO to change email subject at translation for email template, and after i clicked SAVE, it all gone haywire. I will receive email in cyan background and my shop logo will not display in the template but in attachment. I think it's a common bug as i have seen many reported cases like that but no one seems to have a solution yet. Can someone help me?

 

I am using PS1.6.1.2

post-836779-0-46102700-1447953630_thumb.jpg

Link to comment
Share on other sites

hi i hope someone could help me on this issue, i went to BO to change email subject at translation for email template, and after i clicked SAVE, it all gone haywire. I will receive email in cyan background and my shop logo will not display in the template but in attachment. I think it's a common bug as i have seen many reported cases like that but no one seems to have a solution yet. Can someone help me?

 

I am using PS1.6.1.2

 

I could help but then i will need a login to your backoffice to see whats going on.

Link to comment
Share on other sites

  • 2 weeks later...

Hi, some can tell me why i don't have the AdminTranslationsController.php file in the overdrive folder like in the video ?

 

I try to fix manually :

file_put_contents($path.$mail_name.'.'.$type_content, $content);
 
It's working, now notepad++ for all the mail.
Thanks
Edited by Guix69 (see edit history)
Link to comment
Share on other sites

 

Hi, some can tell me why i don't have the AdminTranslationsController.php file in the overdrive folder like in the video ?

 

I try to fix manually :

file_put_contents($path.$mail_name.'.'.$type_content, $content);
 
It's working, now notepad++ for all the mail.
Thanks

 

 

you have to download the file in the first topic and place it into the override folder, it normal its not inside the override folder.

Link to comment
Share on other sites

  • 3 weeks later...

OK so I tried this..

After I loaded the new fle to replace the other - I was no longer able to access Translations in the back office. Got "Server Error"

 

ANY solution for this? 

 

Not being able to save these url prarameters is driving me bonkers 

Link to comment
Share on other sites

OK so I tried this..

After I loaded the new fle to replace the other - I was no longer able to access Translations in the back office. Got "Server Error"

 

ANY solution for this? 

 

Not being able to save these url prarameters is driving me bonkers 

 

What prestashop version are you using?

What actions did you do ?

Post the full error.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 7 months later...

Hi

i have prestashop 1.7.1.1 

but the issue is the same... in the editor i see the {} but in the html preview i see the %7D

 

and when i edit the html link  in prestashop it shows the {} and i cannot find any %7D related.. 

can some one help ?

 

26941513_1642841905776547_1474497113_o.jpg

26942036_1642841885776549_1044287900_o.jpg

Link to comment
Share on other sites

On 29/07/2015 at 9:24 AM, oscar-endphasys said:
The problem is that the editor of email templates (the famous TinyMCE), when you edit a link, always replaced in the URL field the characters "{" and "}" to "% 7B" and "% 7D" for hard you try, and always travels URL link wrong because it is not the variable to put the correct URL.

 

 

 

 

The trick is 100% reliable to solve it and that I have solved my problem is this.

 

Hi

i have prestashop 1.7.1.1 

but the issue is the same... in the editor i see the {} but in the html preview i see the %7D

 

and when i edit the html link  in prestashop it shows the {} and i cannot find any %7D related.. 

can some one help ?

 

 

 

All email templates are HTML files in the "mail" folder of your template and generic Prestashop. Also you find this folder on the modules that are associated sending emails. Well, like HTML files without more, you can edit them there for not using TinyMCE editor. There you can successfully create URLs of the links, putting well the characters "{" and "}". Then save changes and upload the html file via FTP, substituting there. So, you get to leave the HTML file you want and well done.

 

 

Link to comment
Share on other sites

13 minutes ago, simchgab said:

I solve the problem, with prestashop 1.7.2 and, delete the htaccess in the folder mail. And uploading the store in a hosting.

 

Hi ,

 

but i cannot upgrade to presta 1.7.2 because i already tried and did not work the update... 

how can i fix in this version of prestashop? only delete the htaccess in the folder email?

Link to comment
Share on other sites

5 hours ago, nbexiga said:

Hi ,

 

but i cannot upgrade to presta 1.7.2 because i already tried and did not work the update... 

how can i fix in this version of prestashop? only delete the htaccess in the folder email?

 

Yo elimine el htaccess de la carpeta mail, desactive ModSecurity  en el servidor (Me trae problemas de redirecciones y no se hasta que punto no me afecto en los mails) Y si estas en localhost, prueba en un hosting gratuito a ver si tenes el mismo problema. (Te adjunto imagen de mi carpeta mails)

captura.JPG

 

Incluso eliminando el archivo htaccess, también solucione un problema que tenía que no me abria el visor de mails en los estados, ;)

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

  • 4 years later...
On 1/17/2018 at 4:09 PM, nbexiga said:

Hi 

i am not in local host. it's in local host because i downloaded the files to local host for can change.

the delete of htaccess does not work ;/;/;/

Do you find a solution for this problem?
I have exactlly the same in prestashop 1.7.8.6 and don`t find a solution.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...