drush icon indicating copy to clipboard operation
drush copied to clipboard

Sub-theme regions created with `drush generate theme` don't match

Open gitressa opened this issue 1 year ago • 0 comments

Describe the bug

Drush supports creating a sub-theme, which is great (see Generating a new sub-theme using Drush).

But the regions are not copied over from the base theme into the sub-theme *.info.yml file, so they are different, and block placements are not inherited.

To make it work as expected, you need to manually copy the regions from base- to sub-theme, before installing the sub-theme.

To Reproduce Create a sub-theme with drush generate theme, set olivero as base theme.

Expected behavior That the regions from the base theme Olivero would be present in the new sub-theme.

Actual behavior The standard regions were present in the *.info.yml file, as when creating a stand alone theme.

Workaround Manually copy the regions from the base theme to the sub-theme, before installing the sub-theme.

Suggested solution Either update the code to make it copy over the regions, or add a note during step "#3 Base theme", that you need to copy over the regions manually.

System Configuration

Q A
Drush version? 12.x
Drupal version? 10.x
PHP version 8.x
OS? Linux

Additional information Add any other context about the problem here.

gitressa avatar Feb 01 '24 18:02 gitressa