Default theme per domain gets saved only if "remember domain setting" activated.

Created on 8 October 2021, about 3 years ago
Updated 4 September 2024, 4 months ago

Drupal Version

Tested with Drupal core version 9.2.x and 9.3.x

Domain module version

Tested with latest beta and latest dev in time of issue report.

Expected Behavior

To use different themes for different domains under admin/appearance.

Actual Behavior

It seems that made changes randomly take sometimes effect and sometimes not. You can check this under saved config in the domain settings pages under admin/config/domain.

Steps to reproduce

To reproduce: Try to enable different themes for different domains under admin/appearance by selecting different domains and enabling different themes for different domains at it. It doesn't matter if you try only one at once or multiple domains one after the other. In some cases it happens immediately without any issues. In other cases it shows the selected theme correctly on top as the selected default theme for given domain for one moment but when coming back to this page it has turned back to the status of before. No config saved under admin/config/domain

Using the setting "Remember chosen domain" (or what it is called) has no effect on it. From my tests in the last weeks it seems you have to repeat it 10 times and clear caches 20 times and sometimes it works and sometimes not. I even had Devel and rebuild theme registry enabled to look if it helps without success. In one case it was like trying million times with no effect and then coming back to it on the next day and Voila! it was there. I have no clue where to start.

Since there is no report here on it yet I assume it will be not reproducible for others? Any idea how to test closer what happens behind in the moment the user tries to change the default theme for another domain under appearance? Our UX tests in the offices reveal that it is very unintuitive that core does not support a submit button on the appearance page except the admin theme setting on the bottom, by the way. This way you always have to hope that the ajax request in the background fires correctly against given domain when setting a theme as default. I would like to tackle down the issue to put our eyes on the right spot but I need some hints where to search.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France dqd London | N.Y.C | Paris | Hamburg | Berlin

    Sorry that I missed the last comments in here. Otherwise I would have encouraged you to document this for sure. +1 This would be very helpful. And to manually write config isn't hard nor magic. In the command line it is even fun and speeds up site building once you get used to it. Cloud apps like Nextcloud do it for a long time with their users. I try my best to encourage people not to shy away from Domain because of some aspects which are maybe not obvious in the first moment or which do better "work the other way around". That's why I created the #Domain Slack channel in the Slack Drupal Workspace. Feel free to join us! Domain is a very powerful tool for those who run multiple Drupal instances which share more then 10% of the content and realize they actually can run it all in one instance of Drupal to update and maintain.

Production build 0.71.5 2024