Problem/Motivation
The theme policy element (ThemeEmailAdjuster) has an option "Active with fallback". It means: use the active theme unless that theme has has no mail CSS in which case use the default theme. This is probably rather confusing for people.
It made sense originally, because this option was intended specifically for deciding which theme to use for CSS. Now the option applies also to templates, and now it no longer makes sense really.
- It's a valid case to wish to create email templates without adding CSS
- it doesn't seem right that adding a CSS file to a theme would change which templates are used.
Proposed resolution
Change the meaning of "Active with fallback" so that fallback occurs specifically if the active theme is the admin theme. (If a site has just one theme that is default and admin, this still works, as it will fallback to itself.)
Remaining tasks
Write code
User interface changes
Change in setting description/meaning. Slightly not back-compatible but would only be noticeable in unusual cases.
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | symfony_mailer.active-fallback.3263679-4.patch | 2.92 KB | adamps |
Comments
Comment #2
balis_m commentedI agree that the "Active" option in
ThemeEmailAdjusteris way better than "Active with fallback".I don't think that we should remove the "Active with fallback" option.
For new installations, I would suggest to set the "Active" option as default in
ThemeEmailAdjuster.For existing installations, I would suggest to add a hook_update that searches for email policies that use the ThemeEmailAdjuster (maybe with the "Active with fallback" option) and then return a message to the user to check those policies and decide which setting is better.
Comment #3
adamps commentedThanks for your comment.
I've just remembered the main reason I was in favour of "active with fallback", which is that mails can be sent from the admin theme, e.g. user activation by admin action, simplenews test, commerce resend receipt. I believe we need a solution that works at least for the simplest of sites with only an active them and an admin theme. And we should support the case of a theme with templates but no CSS.
None of the solutions described so far work in every case, however I have a new idea that I think does, see updated IS. How does that sound?
Comment #4
adamps commentedComment #6
adamps commented