Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have an HTML email being sent via a Rule. It exists as part of a Features module feature that I am enabling on our staging server. The "Filtered HTML" Input Format is selected. If I select another, it correctly changes, but if I save the Rule Action, the value does not stick. When I reopen it, the original input format remains selected.
For what it's worth, I'm doing this because the Linebreak filter is used for the default input filter and my HTML emails are breaking really weirdly.
Comment | File | Size | Author |
---|---|---|---|
#7 | mimemail_1203234_03.patch | 5.57 KB | sgabe |
#4 | mimemail_1203234_02.patch | 3.52 KB | sgabe |
Comments
Comment #1
Offlein CreditAttribution: Offlein commentedI see I seem to be able to do this globally by modifying the Mime Mail settings.
Comment #2
sgabe CreditAttribution: sgabe commentedThe main point of using filters would be to enable using WYSIWYG editors on this field, not to use an input format different than the module setting. However I see this needs some enhancement. We should either disable the field (and use the module setting) or save the chosen input filter for the field.
Comment #3
Offlein CreditAttribution: Offlein commentedRight, agreed with that, sgabe. I think it would be sufficient to lock the field and include a note that says "HTML emails are filtered using the global Mime Mail module setting. Visit the Mime Mail configuration page to change that." or something.
But, I guess I also still do prefer saving the chosen input filter. I'm using Rules for these mailings because I want our staff to be able to modify the text and whatnot later using, as you suspected, the WYSIWYG. I could ostensibly see having a mime mail rule or two, though, that uses just PHP code and, hence, would use my PHP code filter only, so I'd want to choose a different Input Format.
Comment #4
sgabe CreditAttribution: sgabe commentedPlease test the attached patch and report back. Note that the patch contains some changes from #1128354: Check markup only before wrapping.
Comment #5
Offlein CreditAttribution: Offlein commentedOK. Just so we're clear, this extends the ability to choose input filters per rules? Not the "lock the field" option?
Comment #6
sgabe CreditAttribution: sgabe commentedYes.
Comment #7
sgabe CreditAttribution: sgabe commentedThe attached patch has been committed for 6.x-1.x including this fix for system actions too.
Comment #8
Offlein CreditAttribution: Offlein commentedsgabe, I'm sorry I didn't have an opportunity to test this....
Comment #9
sgabe CreditAttribution: sgabe commentedNo problem, it looks good for me. Test it when you will have some time and report back if anything goes wrong.