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

Comments

AdamPS created an issue. See original summary.

balis_m’s picture

I agree that the "Active" option in ThemeEmailAdjuster is 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.

adamps’s picture

Issue summary: View changes
Issue tags: +Release note

Thanks 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?

adamps’s picture

Status: Active » Needs review
StatusFileSize
new2.92 KB

  • AdamPS committed 2a0ee19 on 1.x
    Issue #3263679 by AdamPS: Theme policy option "Active with fallback" is...
adamps’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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