Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on saving plain html code in email templates #3797

Closed
squestel opened this issue Jun 26, 2017 · 17 comments
Closed

Issue on saving plain html code in email templates #3797

squestel opened this issue Jun 26, 2017 · 17 comments

Comments

@squestel
Copy link

squestel commented Jun 26, 2017

Issue

I try to generate an email template from html/css code, on saving everything disappear

Expected Behavior

Of course I expect the html page to be saved properly and keeping the css like it's meant to be

Actual Behavior

I get a white page, like the default model

Possible Fix

I suggest that the html check doesn't reject a plain html code (......)

Context

It's a high priority because we take our tme to make a complete html template for our emails, and suitecrm rejects it !

Your Environment

  • SuiteCRM Version used: We use SuiteCRM 7.8.5 but it does that in previous versions too
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): I use Firefox but it does that on every browsers
  • Environment name and version (e.g. MySQL, PHP 7): we use PHP 5.6 and MySQL
  • Operating System and version (e.g Ubuntu 16.04): Windows 7,10 and Debian

Would you please tell me where to modify the check system on click on the save button so it can accept my html content

@Dillon-Brown
Copy link
Contributor

@squestel I am unable to replicate this. Is there a specific example of html code that you could give?

@Dillon-Brown Dillon-Brown added the Status:Requires Updates Issues & PRs which requires input or update from the author label Jun 27, 2017
@squestel
Copy link
Author

squestel commented Jun 27, 2017

It's the only way I managed to give you my code..

Just another precision, when I only keep the body with the style tags, I can save it, but doesn't display properly.

Here's our code :
html issue.docx

@Dillon-Brown
Copy link
Contributor

@squestel It seems to be saving correctly with that code, apart from some formatting issues that are due to the issue here: #3672

@squestel
Copy link
Author

squestel commented Jun 27, 2017

Here's what we get, on multiple instances :

As I said, it gets saved only when we remove some html tags, but we lose the css
So we need the entire code to be saved

expected_on_save
result_on_save

@squestel
Copy link
Author

squestel commented Jun 27, 2017

With that being said, would you please tell me which part of the php code I have to modify in order to bypass the html purifier.

Here's a post on the suitecrm forum about this issuen from a long time ago and still not fixed :
https://www.suitecrm.com/forum/feedback/11443-email-template-editing

Thanks

@janbarendse
Copy link

I also noticed that the htmlcode gets truncated to a certain amount of bytes, made my responsive html mail to fail.

@Dillon-Brown
Copy link
Contributor

@janbarendse That sounds like a bug. Can you raise a new issue for it?

@Dillon-Brown
Copy link
Contributor

Dillon-Brown commented Jun 28, 2017

@squestel From what I can see from your screenshots the issue is actually due to using the Mozaik editor, the html purifier won't be causing the template to appear blank. This is most likely due to making a change in Mozaik that caused the html code to be outside the mozaik "block". For existing templates you would want to use the Direct HTML editor that you can find under email settings in user profile.

This doesn't appear to be a bug so i'll be closing the issue. If you are able to replicate the direct HTML editor returning a blank template then please re-open. Thanks.

@Dillon-Brown Dillon-Brown removed the Status:Requires Updates Issues & PRs which requires input or update from the author label Jun 28, 2017
@squestel
Copy link
Author

squestel commented Jun 28, 2017

Hi,

I'm not sure I understand what youre telling me to do, I actually tried to go to email parameters in the admin section (in french), and uncheck all the tags, save and repair ( just in case) and I still get a blank page :
issue

@Dillon-Brown
Copy link
Contributor

@squestel Hi, the option to change editors can be found under user profile here:

github_editor

If you already have an HTML template you will want to use the "Direct HTML" option as using "Mozaik" will break the html.

@squestel
Copy link
Author

Here's what I get on 7.8.5 version :
issue

@Dillon-Brown
Copy link
Contributor

Dillon-Brown commented Jun 29, 2017

@squestel My apologies, I mistakenly thought you were on 7.9. I've created a fix here: #3817 that should have resolved email templates returning blank. However, it seems that the template code you provided is still causing issues, this may indeed be a seperate bug. I'll play around with it a bit and see if I can figure out what exactly is going on.

@squestel
Copy link
Author

Thanks for caring, unfortunately after doing your changes, and repairing, on two different instances, I still get a blank page ( at the repair i've been proposed to execute sql queries ).

@tlosio
Copy link

tlosio commented Jul 12, 2017

Hi,

I also have the exact same problem, in our corporate we need to use our custom Html template for campaigns but that's not possible currently because the module mess up our template structure on saving.
That's urgent we can't afford to lose our time doing back our template for productivity sake.

Would you please help me out.

Thanks in advance.

@Dillon-Brown
Copy link
Contributor

@tlosio What version of SuiteCRM are you on? are you getting the same issue regarding a blank page or just template formatting?

@tlosio
Copy link

tlosio commented Jul 19, 2017

Thanks for answering, I actually recently upgraded to 7.8.5 but I used to get the same issue on 7.8.3.

On saving a complete html or mine, it gives me a blank page, and when taking off the "!DOCTYPE html etc..." ( maybe < html > too ? ), I have a really strange display on saving because I saw that SuiteCRM adds new html tags ( ex : < tbody > ) so he plays around with my html code and that really sucks.

As I see, we seem to be a lot who complain about this thing regarding SuiteCRM... Hope it will get fixed pretty soon....

@dl3737
Copy link

dl3737 commented Feb 18, 2018

we have now vesion 7.9.12 and still have the same problem. I think it will not be solved!
although email template is very important in CRM programe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants