I can install and set the sub-theme as active. I get no errors during this process.
However some things in the admin interface are not rendered, for example the content tabs in the content overview (see attached screenshot).

Am I missing something here, are there specific sub-theme instructions for adminimal, or is this a bug?

this is my *.info.yml file

name: zap admin
type: theme
description: Sub-theme of adminimal
core: 8.x
base theme: adminimal_theme

thank you!

joris

CommentFileSizeAuthor
content_tabs.png18.81 KBjoske_zap
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joske_zap created an issue. See original summary.

gpap’s picture

Have you checked the block layout page on /admin/structure/block?

joske_zap’s picture

Yes, but primary tabs and secondary tabs which are available in the adminimal theme (admin/structure/block/manage/adminimal_theme_primary_local_tasks), are not available in the sub-theme...

aheredia’s picture

Hi seems that you have to copy config/install and config/opitonal files in your subtheme.

Rename the files accordingly block.block.adminimal_theme_breacrumbs.yml to block.block.subthemename_breadcrumbs.yml.

Remember to do the same inside each file to.

Hope this help you
Regards

ANDiTKO’s picture

Category: Bug report » Support request

Check what @aheredia said and let us know if it worked, Thanks!

zarexogre’s picture

I have copied over the config files, changed the file names and the theme within the files and still no joy. The blocks layout section is empty, love to be able to sub theme adminimal!

Nick Hope’s picture

I wanted to tweak a few css settings in the adminimal theme by implementing a sub-theme but I also ran into this problem. After initial trouble, I tried copying over the entire config folder and changing all the instances of adminimal_theme in the files within it, but still got problems. Eventually I had cloned almost the whole theme and it still wouldn't work. So I gave up and just hacked the Adminimal theme itself, adding a "nick-tweaks.css" file in the css folder, and adding it in adminimal_theme.libraries.yml.

bgm’s picture

Worked for me: Copying over the 'config' directory and renaming both the files and their contents (as suggested by @aheredia in #4).

jsst’s picture

As per https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-t..., paragraph "Inheriting Block Placement", copying over the config folder should not be necessary. Copying the folder to the subtheme as suggested in #4 and #8 doesn't work for me either. I copied the install/* configuration to my CM export (config_installer / config/syc) and that does work.

This seems to be a core issue: https://www.drupal.org/project/drupal/issues/2635978

aheredia’s picture

Normally should work after reinstalling the theme after doing what its suggested in #4

Ger O'Brien’s picture

Modifying the config/optional files as advised by @aheredia at #4 worked for me. Thanks.

japo32’s picture

Same here. #4 works.

gnuschichten’s picture

Status: Active » Reviewed & tested by the community

Renaming all theme names within the config files, as suggested in #4, works for me. Thanks!

bharker’s picture

I had to copy the config files and rename as mentioned in #4 in order to get my sub-theme functioning, all seemed well until I noticed that the secondary_local_tasks block doesn't seem to be rendering in the pre_content region. I do get the other regions including breadcrumbs and local_actions blocks. Can anyone else confirm they are seeing the secondary_local_tasks in their sub-module?

bskibinski’s picture

Some extra info, and an easier fix below, this isn't adminimal's problem, this is all Drupal themes:

An easier way of fixing this without copying (thus overriding) all block files is to implement this code-snippit in your subtheme, and change the block prefix to match (code snippet below) in your *.theme file:

/**
 * Implements hook_theme_suggestions_HOOK_alter for blocks.
 */
function shaved_theme_suggestions_block_alter(&$suggestions, $variables) {

  // Load theme suggestions for blocks from parent theme.
  foreach ($suggestions as &$suggestion) {
    $suggestion = str_replace('adminimal-sub-theme_', 'adminimal_', $suggestion);
  }
}

Also don't forget to copy the regions into your .info file, your subtheme doesn't inherit regions from the base theme.

Joe Huggans’s picture

Couldn't get #15 working.

However I have got this working now using the suggestion from #4, however you need to include the regions from the adminimal theme in your subtheme or as reported in #14 there are some secondary local tasks missing.

As far as I can tell this is now working

I've created a Git Repo here for reference

tonylegrone’s picture

#4 and #15 together are the fix. The theme must be uninstalled and reinstalled in order for the code changes to work though. For anyone else having trouble with it, make sure you go through that process. Also, maybe I'm missing something, but I couldn't find any way to uninstall a theme in the UI. I had to do it with drush theme:uninstall theme_name.