Problem/Motivation

As per the title, while hidden themes do not show in the system themes page - they do show up in the local tasks, see screenshot.

I do not think this is supposed to be like this, so I assume it's a bug.

Proposed resolution

Remaining tasks

User interface changes

API changes

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because hidden themes appear in the local tasks tabs
Unfrozen changes Unfrozen because it only removes the settings tabs for hidden themes

Comments

Jeff Burnz’s picture

Issue summary: View changes
dawehner’s picture

Issue tags: +Needs tests
StatusFileSize
new882 bytes

Does this fix the issue for you?

Jeff Burnz’s picture

Status: Active » Needs review

Yes, it fixes the issue, looks good to me.

jhedstrom’s picture

Issue summary: View changes
StatusFileSize
new1.63 KB
new2.49 KB

This is a re-roll + I added a test to illustrate the issue and the fix.

The last submitted patch, 4: theme-local-tasks-hidden-2261087-04-TEST-ONLY.patch, failed testing.

dawehner’s picture

Great to have some test coverage ...

I'm a bit confused, what are the usecases for hidden themes, just curious ....

Jeff Burnz’s picture

1) when a theme is useless as a front end theme, i.e. its just a base theme. However with themes now being installed, rather than just enabled, hiding them is not user friendly as the user can never uninstall the hidden theme.

2) you have a starter kit theme that is supposed to be copied somehow and not actually used, there are several themes like this in D7 and in D8 also. I.e the starterkit is not entirely viable as it is, it needs to be modified somehow in order to be a viable theme. You might want to hide these so users don't inadvertently blow up there sites.

How base themes are handled is rather lame in Drupal to be frank, there does not appear to be any way to switch off "set as default" or "settings" etc. Pretty basic stuff really.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Thank you for the explanation!

Do you remember maybe how it used to be handled in Drupal 7?

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: theme-local-tasks-hidden-2261087-04.patch, failed testing.

Status: Needs work » Needs review
jhedstrom’s picture

Status: Needs review » Reviewed & tested by the community

And back to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs documentation

The documentation in InfoParserInterface::parse() needs updating to reflect the fact the theme's support the hidden property (again).

jhedstrom’s picture

Status: Needs work » Needs review
StatusFileSize
new667 bytes
new3.14 KB

Updated documentation.

mile23’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The patch in #13 doesn't apply, so it'll need a reroll if it's still an issue.

I tried to repro this with adaptivetheme.

I grabbed the 8.x version of adaptivetheme.

I enabled at_core to see if it appeared in the Settings page.

As it turns out, yes, it does, because it doesn't have hidden: true in .info.yml. :-)

So I disabled it and then set hidden: true in AT Core's .info.yml file.

AT Core then didn't appear in the list of uninstalled themes, which I believe is expected behavior.

But... I couldn't re-enable it or the supplied at_generator subtheme, due to this error:

Unable to install at_core, responsive_image.mappings.at_content_image, responsive_image.mappings.at_teaser_image already exist in active configuration.

So the real bug here appears to be that these config elements aren't cleared when we uninstall. I'm not sure whether that's core, or whether it's adaptivetheme, though I'd bet on the latter.

Unable to repro.

druprad’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new3.14 KB

Just re-rolled the patch for comment #13

druprad’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
StatusFileSize
new72.17 KB

Merge failed find attached screen for reference.
+needs reroll

druprad’s picture

Assigned: Unassigned » druprad

I am working on reroll

druprad’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new3.14 KB

re-rolled the patch for comment #15

druprad’s picture

Assigned: druprad » Unassigned

Unassigned as reroll completed, so someone can review.

Jeff Burnz’s picture

#14not sure whats going on there, but AT deliberately does not have hidden: true because there is no easy way to uninstall a theme that is hidden, also I think you may have missed the actual bug - its when hidden: true is set the link to the supposedly hidden themes settings is still visible in the secondary links.

With regards to the responsive image style config, indeed this is a bit of a mess and is another unrelated bug IMO, unless there is some way for us to clean up the config on uninstall, but surely we can't be expected to do this?

dawehner’s picture

Status: Fixed » Closed (fixed)

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