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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Offlein’s picture

I see I seem to be able to do this globally by modifying the Mime Mail settings.

sgabe’s picture

The 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.

Offlein’s picture

Right, 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.

sgabe’s picture

Status: Active » Needs review
FileSize
3.52 KB

Please test the attached patch and report back. Note that the patch contains some changes from #1128354: Check markup only before wrapping.

Offlein’s picture

OK. Just so we're clear, this extends the ability to choose input filters per rules? Not the "lock the field" option?

sgabe’s picture

Yes.

sgabe’s picture

Title: Cannot Modify Input Format on Existing Rules » Store input format setting for Rules and actions
Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Needs review » Fixed
FileSize
5.57 KB

The attached patch has been committed for 6.x-1.x including this fix for system actions too.

Offlein’s picture

sgabe, I'm sorry I didn't have an opportunity to test this....

sgabe’s picture

No problem, it looks good for me. Test it when you will have some time and report back if anything goes wrong.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.