Admin theme not used when Content Type specified in TS Rule

Created on 18 September 2024, 3 months ago

Problem/Motivation

I'm working on a multi-domain D10.2.2 site where each domain has a separate theme (as well as some sub-themes specific to parts of the site), controlled by TSR for some time without issue. One of these domains now requires a section where we decided to use a brand new sub-theme, and so I set it up just the same as before - the only difference is that I specified that the rule only apply to a single Content Type, as that is the only CT that will appear in the new section anyway.

Switching on this rule works fine, and the rule applies as it should to a dummy page set up at the required path for dev/testing purposes. However, I noticed that the TSR admin page itself had suddenly taken on the styling of the theme, bypassing both the admin theme specified in TSR (removing this altogether makes no difference) as well as the admin theme of the rule used by the main parent theme. Clicking around a bit, it became clear the admin theme override was happening throughout the site now. Remove the CT restriction, and all this went away: the site went back to respecting the admin theme either specified in the rule, or if none specified there, whatever was selected as the default admin theme of the whole site. This is fine for me for now, as we do not expect any other CTs to be used in the new section as I mention above, but it is less than ideal should that change.

A further thing to note is that I experimented by selecting other CTs in the Rule, selecting them all, negating the condition, etc. The incorrect admin override happens each time, the only thing preventing it being to simply not use the Content Type condition in the Rule at all.

Happy to flesh this out further as and when questions arise, but this is the basic premise I wanted to jot down before I had to move on due to time.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024