Problem/Motivation
Brand new clean install of 9.1.8.
First thing I do is create a new theme in themes/custom/
I create the ...
themename.info.yml
and
themename.libraries.yml
Files.
name: themename
type: theme
description:
core: 8.x
core_version_requirement: ^8 || ^9
# Defines the base theme
base theme: stark
# Defines libraries group in which we can add css/js.
libraries:
- themename/global-styling
- themename/global-scripts
When I go to /admin/appearance I get a white screen error with this error.
InvalidArgumentException: $string ("") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 132 of /app/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).
I left the "description" blank, cause... I didn't think I needed it.
I sorta deduced what the problem is, and added some characters so it had SOMETHING in the Description, and the problem went away.
I think this should not have a fatal error... or at least give you some better directions. I can see entry level theme builders throwing up their hands pretty quickly with a white screen error and they don't know how to turn on verbose error messages.
Steps to reproduce
See above.
Proposed resolution
Friendlier error messages, or allow for the Description field to be blank.
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet