-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Changing mail template for com_contact no html body #44686
Comments
That happen because TinyMCE forces every content to be inside a tag, and so it wrap the default text in to As work around: |
First of all I'm using JCE editor, second I know how to solve it by creating my own hmtl body that works without problems. |
My comment is correct and adressed to everyone who will ever will hit this issue in the future. There is no easy fix for it. jce is based on tinymce. |
This is a bug which needs to be fixed |
@brianteeman totally agree. I have enough knowledge to eiter remove entries from database or create my own html template, but this is not how it is supposed to work. |
Issue is labeled as |
This is the TinyMCE issue, the same as #44396, it is how TinyMCE works. We probably could force Codemirror for HTML editing for emails, similar as it done for template files editing. |
@Fedik |
There seems to be a lot of frustration here from your point of view @Pinkeltje. But with all due respect, this tone and the insinuations are completely unnecessary and missplaced. Many thanks, @Fedik, for your explanations and constructive suggestions on this issue. I think this will be very helpful for other people who unfortunately have to deal with the tooling themselves. |
Back to the actual problem, as already mentioned, there is a conflict between the behaviour of the WYSIWYG editors, whether TinyMCE or JCE, and the creation of the templates when they are first saved. To be honest, I think this is absolutely sufficient, as an inexperienced user will probably end up very frustrated with the mail templates if he tries to style anything here, even with a WYSIWYG editor. These editors are simply not designed for this and emails do not work 1:1 like an HTML page. In fact, an inexperienced user should not enter anything more than plain text here or use one of the countless free generators especially for emails in the www and then copy and paste directly here. This also ensures to some extent that the emails reach the recipients on all clients (Outlook, GMail, Thunderbird, etc.) and possibly in dark and light mode as the creator intended. I think it's an even more frustrating experience for inexperienced users when they ‘build’ something here in painstaking work only to realise that it looks completely different on the recipients end. |
OK. I'll stop reporting bugs, though. I am apparently not taken seriously and assumptions are being made here without bothering to test. |
@Pinkeltje please dont stop reporting bugs. What you identified is a bug and it not correct to say that it can only be fixed by changing to use codemirror. @LadySolveig it is NOT about styling the message to look like a web page but some simple markup such as even a bold tag |
It doesnt have to do that - thats a configuration option |
@brianteeman I would like to see that :) |
Too bad reporting bugs is one of the biggest gifts for this project to stay alive. I really appreciate your commitment @Pinkeltje ! @brianteeman There are always several solutions to a problem. Fedir has so far been the only one to make a constructive suggestion. If, as you say, it is possible to configure this differently for TinyMCE in particular for the mail templates, then perhaps we could implement this in the CMS. However, this would probably not solve the issue for the creator? As he has pointed out that he installs and want to use JCE. |
The problem is that the language constant should NOT be displayed in the html editor - it should be the language value. If you enable language debug then you will see that the language string is not found because it is looking for the langauge string in the ADMIN language file but the language string is only present in the SITE language file I am not sure if the best solution is to add the string to the admin language file OR if the com_mails component should be updated to look in both the site and the admin files. If you look at the function
You do not see the reported problem in any of the mail templates because they are all admin language strings as a super quick check would have shown This is NOTHING to do with the editor being used and NOTHING to do with the editor wrapping strings in the html black element p |
As further confirmation that this is nothing to do with the html editor the exact same problem for the exact same reason exists for the com_contact mail templates when using PLAINTEXT |
Okay, then it is not an editor issue, thanks for checking. |
would have saved upset if both you and @LadySolveig had actually looked at it before replying - but moving forward I am not sure on the best way forward.
|
@Pinkeltje as a quick fix for yourself you can add these two lines to
|
I can take a deeper look into this next week. |
@brianteeman
@zero-24 Thanks for looking into it. I think this should be an easy fix contrary to the fix for #44396 |
Hi, please take a look into this PR: #44730
Yes thats more complicated. Could be solved by letting the strings beeing edited with an editor but I'm sorry will not have the time to dig deeper into that Issue. |
Steps to reproduce the issue
Fresh install of Joomla 5.2.2.
Go to mailtemplates and open Contacts: Contact Form Mail
Do nothing and just save
Expected result
Mail sent to admin contains contactform information
Actual result
Mail sent to admin only contains language constant COM_CONTACT_ENQUIRY_TEXT
System information (as much as possible)
Joomla 5.2.2
PHP 8.2.12
Additional comments
Database entries for Global Configuration: Test Mail which stays ok upon save and entry for Contacts: Contact Form Mail where hmtlbody is wrong
The text was updated successfully, but these errors were encountered: