Problem/Motivation

When using a theme that has hidden: true set in it's .info.yml file as the default theme, I believe the expected behavior is that it should still appear on appearance settings page. However it is currently not displayed. The theme settings are still available via the toolbar menu, though, and can be seen by going to Appearance > Settings.

Steps to reproduce

Set a theme that has hidden: true in it's .info.yml file as the default theme and view the Appearance settings page (/admin/appearance).

Proposed resolution

Adjust https://git.drupalcode.org/project/drupal/-/blob/9.4.x/core/modules/syst... to either incorporate the ThemeHandler::hasUi method or check the status of the theme as well as if it's hidden (so change SystemContrroller:216 to if (empty($theme->status) && !empty($theme->info['hidden'])) {.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

rromore created an issue. See original summary.

cilefen’s picture

Issue tags: +Bug Smash Initiative

I am pretty this is "works as designed". It looks like the use case is for testing, etc, and the documentation indicates this is as intended.

rromore’s picture

Category: Bug report » Support request

Thanks for the prompt reply! I see now, that does indeed look to be the intended behavior.

I guess I'm confused as to what the theme is responsible for as far as settings are concerned, versus what a sub-theme is for. If I have a theme A and a sub-theme B, B inherits A's theme settings form, right? So a user could edit theme A's settings as well as theme B's settings, so what is the point of showing theme A as well? Wouldn't that just be confusing to the user?

Or are sub-themes supposed to override their parent theme's settings form and remove any of the parent theme's settings, and the user is supposed to configure both theme settings independently?

Is there documentation on this? Apologies if this isn't the place for this discussion. I can move it to the slack support channel if needed. Thanks for any information!

cilefen’s picture

Status: Active » Fixed

That is a different question, and yes, I think better information exists elsewhere.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.