Problem
I have upgraded drupal from 10.1.8 to 10.2.6 and there is no change in existing config but still getting runtime exception getSettings() function error for base_field_override config. Please find screenshot for same. During sync process, I am getting below error
Error: Call to a member function getSettings() on null in Drupal\Core\Field\FieldConfigBase->getSettings() (line 374 of FieldConfigBase.php)
Steps to reproduce
I have compared drupal core (core/lib/Drupal/Core/Field/) FieldConfigBase.php file for version 10.1.8 and 10.2.6. I can see the below difference in code.
// Make sure all expected runtime settings are present.
$default_settings = \Drupal::service('plugin.manager.field.field_type')
->getDefaultFieldSettings($this->getType());
// Filter out any unknown (unsupported) settings.
$supported_settings = array_intersect_key($this->getSettings(), $default_settings);
$this->set('settings', $supported_settings + $default_settings);
https://git.drupalcode.org/project/drupal/-/blob/10.1.8/core/lib/Drupal/...
https://git.drupalcode.org/project/drupal/-/blob/10.2.6/core/lib/Drupal/...
Above code added newly in 10.2.6 version which is not allowing import for base_field_override field config. It doesn't ahhave any backward compatiability issue for 10.1.8 core. 10.2.6 code changes are done as part of this issue for Field [storage] config have incomplete settings until they are saved ( https://www.drupal.org/project/drupal/issues/2327883 🐛 Field [storage] config have incomplete settings until they are saved Fixed )
Proposed resolution
If $this->getSettings() is not defined or not available it should be handled.
Active
11.0 🔥