Jump to content

Template e-mail translation bug


Recommended Posts

Hi! I´m with a similar problem, but in my case when i press the update button it simple erases all the templates.

For example i go to back office > tools > translations

then i select email template translation

and click on the language flag ( any language)

on any template if i put a simple black space and press update it erases all the templates...

errrrrr!!!

Any idea??

Thanks!

Link to comment
Share on other sites

I see for instance the welcome message in the core.
If i put some content it doesn't change, i looked some codes and saw that it was indeed getting to the destination, if i changed the e-mail content everything was ok, but subjects was bogus.

I saw that it was saved in mails/LANG_ISO/lang.php and then i saw the welcome message for instance, it was like:
' \'Welcome!\'' if i look in the french file it was like: Welcome! (without the space and the ')
The ' is what made it bogus, i didn't know if it was when i save or when the content was retrieved, anyway the bug seems to apply only to subjects.

I guess that the bug is in the retrieving of the array or in the saving names with spaces or '.

Link to comment
Share on other sites

I submited a bug report and made some solutions.
the files i'm posting solves part of the issues, it will save and retrieve data in the admin.
There seems to be a bug in the counting and i didn't test the actual send e-mail action
The Mail.php goes in the classes dir, the AdminTranslations.php goes in BACKOFFICE_DIR/tabs

Mail.php

AdminTranslations.php

Link to comment
Share on other sites

  • 3 weeks later...
Yes, same problem. I can’t update email templates from backoffice, everything comes to “blanc” if I try to save changes. I have version PrestaShop™ 1.4.0.17.


I have the same problem and i tried to change permissions to folder /mails/en/ - 755 (and 777) and files 644
and I've noticed that after I update email translation from Back Office all files become 777 and all empty.

Need help with this bug.



P.S. PrestaShop™ 1.4.0.17.
Link to comment
Share on other sites

Hi,

this problem has been fixed in version 1.4.1 and above.

To fix it without upgrading, you can use the following fix :

in file admin/tabs/AdminTranslations.php
go line 647, find

            $content = array_map('stripslashes', $content);


replace by

            $content = stripslashes($content);




There is other fix about email titles, you can use the file from the 1.4.1 archive

Don't hesitate if you have other questions (pm me if I don't answer the day you posted, sometimes I forgot )

Link to comment
Share on other sites

  • 2 weeks later...

Hi Pimli,

are you sure to have the last version of the file in your admin directory ?

If you still have the problem, please send me a private message (use the button "PM") with your access to allow me to do some test.

Regards,
Michaël

Link to comment
Share on other sites

sorry it's line 647, you're right :

                        // Magic Quotes shall... not.. PASS!
                       if (_PS_MAGIC_QUOTES_GPC_)
                           $content = stripslashes($content);




Can you please make a screencast (you can create a new bug in http://forge.prestashop.com and click on "create screencast" ) and also give me more details about your configuration ? (which version of php? do you have magic quotes enabled ? which language ? )

Link to comment
Share on other sites

sorry, I did the right question ....

Version 1.4 and had to touch the templates I deleted all mail.

I installed the version 1.4.1 and my question is:

This version has fixed this bug? not dare to touch me and I will do the same ....

I have installed Mamp and language is Spanish

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 9 months later...

I said yes this is fixed in 1.4.1, but Pimli said it wasn't fixed, so I m waiting a way to reproduce it... If I can't reproduce the bug, ...

 

Michael is right ... in PrestaShop™ 1.4.6.2 is solved, i reproduced the "bug" but was about chmod, fixed with chmod 777 for /public_html/mails/en/*.html and *.txt files.

Link to comment
Share on other sites

  • 3 months later...

I also want to report one bug: after moving my prestashop to another host, I no longer can edit email templates, but it works in a very strange way: I can only edit default english language, other additionaly added languages (for example Latvian) isn't working - after pressing "edit template" button, back office page goes to the top and the email template editor doesn't turn on, hence the email HTML template dissapears (txt stays). Any ideas what's might be happening? I've tried editing the permissions to 755 but that didn't help at all...

Link to comment
Share on other sites

  • 1 month later...

Michael is right ... in PrestaShop™ 1.4.6.2 is solved, i reproduced the "bug" but was about chmod, fixed with chmod 777 for /public_html/mails/en/*.html and *.txt files.

 

I am running prestashop v. 1.4.9.0 and i still get these problems, even that i did the cmod on the files and folders as told above.

 

Anyone got an solution for this problem ?

 

Thank you for a good shopsystem.

 

Best regards

 

Peter

Link to comment
Share on other sites

Dear prestashoppere...

 

Is there someone out there who can help me with this problem. I really like prestashop and have already buyed some addons for the shop, but i would really like to keep this shop system, and i still cant get this to work.

 

Thx in advance

Link to comment
Share on other sites

  • 1 year later...

What is the solution of this bug? I have same problem. When translating in back office, email templates goes blank. When translating in Notepad++ html and .txt and then sending it to all files. In servers shows like everything is OK, but when email is sent to customer- it is not translated.

Edited by knowing (see edit history)
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...