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 would like to create a rule: 'when user updates account, if theme property has changed..."
This will also be useful property for Theme Rules.
Comment | File | Size | Author |
---|---|---|---|
#4 | entity-1540180-4.patch | 1.15 KB | alexweber |
#1 | entity-1540180-1.patch | 1.03 KB | alexweber |
Comments
Comment #1
alexweber CreditAttribution: alexweber commentedPatch attached.
Comment #2
mitchell CreditAttribution: mitchell commentedPatch applies cleanly and the property is available, but Rules doesn't behave as expected.
With this rule:
I get an error: "Notice: Undefined index: custom translation language in RulesDataUI::selectionForm() (line 73 of sites/all/modules/rules/ui/ui.data.inc)", and the theme name doesn't appear in the system message. With [account:name], the message is displayed properly.
Comment #3
alexweber CreditAttribution: alexweber commentedI overlooked this, Views integration might be broken too now that I think of it...
Reroll tonight when i get a chance!
Comment #4
alexweber CreditAttribution: alexweber commentedNothing was being displayed because in most cases the user's default theme is actually empty, and falls back to the site's default theme.
I've updated the patch to reflect that.
Comment #5
fagothanks, the default value for the theme_default (bartik) was missing. I've added + removed the unnecessary translatable key + committed it.
Comment #6
alexweber CreditAttribution: alexweber commentedAwesome!
Comment #7
mitchell CreditAttribution: mitchell commentedthx fago! thx alexweber!
While testing the patch, I realized... this solves #1344348: Port Theme Rules to D7 too!!
...Entity API + Rules... what an amazing combination!