If required config values are not set, errors will occur later on and are difficult to trace. For example, if $field_prefix
is not set, then:
modules/field_ui/src/Form/FieldStorageAddForm.php
'#maxlength' => FieldStorageConfig::NAME_MAX_LENGTH - strlen($field_prefix),
will fail when NULL to strlen.
From comments #11 and #13
>>> \Drupal::config('some_module.non_existent')
=> Drupal\Core\Config\ImmutableConfig {#6251}
Should this throw an exception instead, and we need a separate explicit call to create a new config? This would warn users earlier that expected config is missing.
>>> \Drupal::config('field_ui.settings')->get('non_existent_key')
=> null
Maybe also this should throw an exception, if the config exists but the key does not, instead of falling back to NULL?
N/A
TBC
TBC
TBC
I had the case that $field_prefix was not set and therefore I got the issue with passing NULL to strlen.
modules/field_ui/src/Form/FieldStorageAddForm.php
'#maxlength' => FieldStorageConfig::NAME_MAX_LENGTH - strlen($field_prefix),
Needs work
11.0 🔥
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.