- Issue created by @rsbarbano
- First commit to issue fork.
Broken theme when enabling extension "Shortcode CSS Classes"
1. Create a subtheme with AT Theme Generator
2. Enable extension -> Shortcode CSS Classes
Then:
Message: "The website encountered an unexpected error. Try again later."
In dblog i have the following error msg:
TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in themes/contrib/adaptivetheme/at_core/forms/ext/shortcodes.php
I think the problem are the lines:
'#default_value' => Html::escape(theme_get_setting('settings.page_classes_' . $page_elements_key, $theme)),
I've solved it providing a default value '' when the string is null:
'#default_value' => Html::escape(theme_get_setting('settings.page_classes_' . $page_elements_key, $theme) ?? ''),
(these problems repeat in other parts of the code of shortcodes.php)
Active
7.1
Extensions