🇵🇷Puerto Rico @Jaime_Pomales

Account created on 14 May 2007, over 17 years ago
#

Recent comments

🇵🇷Puerto Rico Jaime_Pomales

Thank you for looking into it as well! I appreciate that you are dedicated to doing things the right way. I'm in your debt.

I think what you have suggested is the best solution to sort this out.

🇵🇷Puerto Rico Jaime_Pomales

Yes of course, that's always possible, but the problem is that this module breaks normal admin theme functionality of the civicrm module, which is used by thousands of sites.

In my own case, modifying the priority did not affect my multiple domain setup negatively. All domain/themes were selected properly as expected, and the backend of civicrm stayed with its admin theme.

CiviCRM a well supported module and has been around for decades at this point. When domain_theme_switch is enabled, it takes over the admin theme priority in situations where the admin theme previously worked as expected.

I know it's a relatively small edge case, but I would suggest perhaps a less aggressive default theme priority as a way to make this module more useful out of the box when interacting with CiviCRM installs.

🇵🇷Puerto Rico Jaime_Pomales

After some investigation, perhaps maybe just modifying the theme priority:

services:
  theme.negotiator.domain_theme_switch:
    class: Drupal\domain_theme_switch\Theme\ThemeSwitchNegotiator
    arguments: ['@router.admin_context','@current_user','@domain.negotiator','@config.factory']
    tags:
      - { name: theme_negotiator, priority: 10 }

By changing priority to 0 theme switcher should respect other theme route priorities over itself, especially an admin theme.

After I changed my installation to priority 0 the admin theme is respected by domain_theme_switcher when in civicrm's admin area.

🇵🇷Puerto Rico Jaime_Pomales

Yes, I think you raise a fair point.

I'll give it some thought and see what I can do.

Production build 0.71.5 2024