Active
Project:
Gin Admin Theme
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2025 at 02:40 UTC
Updated:
24 Oct 2025 at 15:33 UTC
Jump to comment: Most recent
If you have Gin installed but not set as the administration theme, and write a custom `theme_negotiator` to set the administration theme to gin, gin does not render correctly, and is unusable.
There's a lot that should be happening but isn't, but at the very least, the `_gin_is_active()` returns false when it should be true.
Screenshots:


| Comment | File | Size | Author |
|---|---|---|---|
| create_node_screenshot_correct.png | 761.46 KB | miwayha | |
| create_node_screenshot.png | 665.72 KB | miwayha |
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
saschaeggiI'm closing this as won't fix. We only support setting Gin as the default theme.
Best regards
Comment #3
miwayha commentedI wasn’t able to find that in the documentation.
Given that theme negotiators are part of Drupal core, can you please add this to the list of known issues?
I’d really like for Gin to be compatible with Drupal core. Would you please consider reopening this as a feature request?
Comment #4
saschaeggiWe're in the process of preparing Gin to be moved into Core, replacing Claro.
There are plans that in the future there will be no option to change the admin theme anymore. Given those circumstances, we won't further explore this.
ThemeNegotiators was more built with frontend themes in mind. Gin has some specialities which is beyond what Core imagined what an (admin) theme would provide.
I hope this helps
Comment #5
miwayha commentedOk it is helpful, thank you. I’m aware that Gin will be the new default admin theme.
At this point, I’m just asking for any of the rest of this to be documented anywhere. I’m not seeing this mentioned in the current Gin documentation.
I’ve spent some time looking at the theme negotiator stuff on api.drupal.org, and I can’t find a mention that theme negotiators should only be used for front end themes.
I’m also having trouble finding an issue describing plans to disable admin theme configuration in future versions of Drupal. I would really be interested in reading that context.
This is all great info: I’m just asking that it be written down somewhere, or somewhere more discoverable than its current location.
Comment #6
penyaskitoThe site WSODs in the opposite case, where Gin is the default admin theme but the negotiator switches to another theme.
This is the case we are exploring at #3531415: [upstream] Can't select media from library in Canvas when Gin is installed, so this is a Canvas blocker + Drupal CMS blocker.
All the more reason to fix this in Gin.
Comment #8
penyaskitohuh? the simplest test ever fails, I cannot save the Gin settings form.
Comment #9
penyaskitoBack-porting #3541807: Clean-up Gin PHP might be a solution. But that requires a core patch. Wondering if this is reproducible at all in gin 6.x
Comment #10
jurgenhaasBack-porting as suggested in #9 will never happen, that's only going to be part of Gin in core.
But that raises a valid question: is this reproducible with 6.x and the given patch? Note, that also requires Drupal core 11.x-dev
Comment #11
penyaskitoThe attached MR is fixing the problem for canvas.
The included test tbh is useless for testing the issue. I could reproduce this before outside of canvas just by trying to save the Gin settings form, but haven't been able to reproduce it consistently either. Happy to keep it or remove it as your will.
This is easily reproduced inside canvas / Drupal CMS 2.x-alpha1, but didn't find yet a way to trigger the problem if not in conjunction with such infrastructure.
Comment #12
penyaskitoI couldn't generate this scenario because of some other canvas bug making it incompatible with the Gin 6.x branch.
I'm still debugging that one, but I'm quite convinced this won't be an issue given #3541807: Clean-up Gin PHP.
This is quite a blocker for Drupal CMS/Canvas, so happy to create a follow-up to explore that, but it shouldn't be as critical as this is now.
Comment #13
miwayha commentedI tested this MR against the issue I reported, and the issue remains. I believe the canvas issue is a separate issue. I'm worried about things getting confused here; should we split this into separate issues?
Comment #14
jurgenhaas@penyaskito we shouldn't be worries about CMS 2.x, Canvas and Gin. The reason why Gin moves into core is exactly for that reason, that such issues will be covered. So, what you see in Gin 6.x right now will be going into Drupal 11.3 and therefore be part of Drupal CMS 2.0 as well.
Setting this back to NW then, as the MR doesn't resolve this original issue according to #13. Also moving back the severity because as @saschaeggi already mentioned, the use case of the issue is not supported.
Comment #15
penyaskitoOP was about setting gin as active when it isn't.
MR is about setting other theme as active when it isn't, and gin not breaking the page.
Comment #16
penyaskitoCreated #3554265: Gin WSODs when is not active anymore after a custom theme negotiator swaps the theme for disambiguation of both issues.