User role condition doesn't work

Created on 4 April 2023, about 1 year ago
Updated 9 May 2023, about 1 year ago

Problem/Motivation

I want to use theme A on content type "rnc" view page.
I setup this theme switcher rules conditions:
- content type = rnc
- user role = admin

When i view "rnc" view page as authenticated user, i see theme B.
The rule doesn't work.

Steps to reproduce

Setup rule as above.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy trickfun

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

Comments & Activities

  • Issue created by @trickfun
  • I'm having a somewhat opposite issue with user role conditions - they get applied for any user roles, not just the chosen roles.

    Even weirder, the rule's admin theme is not applied in the front area (for stuff like admin menus), which is correct behaviour, but in the admin area there is a blend of the default admin theme and the rule's admin theme. #imnotevenmadthatsamazing

    Attached an example of the default Gin theme and the rule's Adminimal theme.

  • 🇫🇷France troesler

    Same for me, and other conditions (like request path) dont work neither

  • 🇨🇦Canada aarantes

    On my site, I have a default theme "A" and administration theme "B".

    In "Theme Switcher", I'm changing the administration theme to theme "A". To apply this change, I'm using two conditions: "Request Path" and "User Role".

    On my production site (still running 8.x-1.2 with Drupal 9.5.8), it works as expected, i.e., only those of a certain "User Role" (I selected 4 roles), AND reaching a specific path (I defined one "Request Path"), are served with the page using theme "A". All other roles use the standard theme "B" in all paths (including the one I defined in "Request Path") as well as those from the 4 roles I defined, when going to ANY path other than the one in "Request Path".

    On my dev environment (running 2.0 with Drupal 9.5.9) the conditions seem to change from AND to OR . ALL roles get theme "A" when going to the path defined in "Request Path". And those people in one of those four roles defined in "User Role" get theme "A" everywhere.

Production build 0.69.0 2024