- Issue created by @stewest
- 🇳🇿New Zealand stewest Wellington
So the basic premise that we wanted to add body classes with certain information to it, is already covered. By default we get classes:
"node-2 node-type--sector-page" as per https://git.drupalcode.org/project/sector_theme/-/blob/1.0.x/includes/ht...Update: Steps reproduce Sub theme errors.
When I run:
php core/scripts/drupal generate-theme --starterkit sector_starterkit NewSubTheme --path themes/custom
I get:
Directory themes/custom/NewSubTheme could not be created - so this needs to be done manually
So I created the custom folder manually and then the php script works. Updating DOCS. (or we could add a .gitkeep file in the folder to make it remain even when empty?)
Then, I install the theme, from the UI as it didn't want to run from
`drush en SUBTHEME_NAME -y; drush config-set system.theme default SUBTHEME_NAME -y`
Then I got this WSOD:
Drupal\sdc\Exception\InvalidComponentException: [id] Does not match the regex pattern ^[a-z]([a-zA-Z0-9_-]*[a-zA-Z0-9])*:[a-z]([a-zA-Z0-9_-]*[a-zA-Z0-9])*$ in Drupal\sdc\Component\ComponentValidator->validateDefinition() (line 119 of core/modules/sdc/src/Component/ComponentValidator.php).
I then removed this theme and recreated a new theme, using a lower case name, and then I get no errors. So sub theme documentation perhaps should refer to: SUBTHEME_NAME in lower case?
-
gareth.poole →
committed 7934751b on 1.0.x
Issue #3401428: Subtheme: Update documentation around subtheming
-
gareth.poole →
committed 7934751b on 1.0.x
- Assigned to gareth.poole
- Status changed to RTBC
about 1 year ago 11:23pm 15 November 2023 - 🇳🇿New Zealand stewest Wellington
The latest updates, fixing the sub theme generation solves the issues mentioned above.