I just built a custom theme for Drupal 10. When enabling it via /admin/appearance, the dreaded message “The website encountered an unexpected error. Try again later.“ appears. drush watchdog:show
says:
Error: Undefined constant "CSS_STYLE" in constant()
(line 184 of web/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php)
My theme’s machine name is neinundamen
. This is the neinundamen.info.yml
file:
name: neinundamen
type: theme
'base theme': drupal_theme_letztegeneration
description: Subtheme of drupal_theme_letztegeneration
package: Custom
core_version_requirement: ^10
libraries:
- neinundamen/global
regions:
- ...
Here is the neinundamen.libraries.yml
file, where I suspect my mistake - but I cannot see a problem.
global:
css:
style:
css/style.css: {}
I tried the usual Drupal steps: updating to the most recent core version, clearing the cache using drush cr
, drinking coffee.
'base theme'
please, flush cache and try again?drush generate theme
won’t have quotes there.