Call to a member function getConfigDependencyName() on null during config export

Created on 13 October 2023, 9 months ago
Updated 6 November 2023, 8 months ago

I am finding it not possible to export some key config overrides because the ConfigManager class sees our configuration as a dependency, but getEntityTypeIdByName() returns null for a module configuration settings entity "type name" whatever that is, thereby making an array with a null value, that throws an error in callOnDependencyRemoval when it runs getConfigDependencyName on the null value. I can't tell if it is a bug in core's config manager, a bug in the key module, a bug in pantheon_secrets, or a problem with our module configurations. Can't tell if it's an error of omission (the module config should be in the list) or an error of inclusion (the dependency array should not have the module settings as a dependency), or an error of the Config Manager needing to chill and not throw the error.

I am wondering if those who are using this for key config overrides have come across this? I've searched for issues, found a couple of similar but not identical ones ( https://www.drupal.org/project/drupal/issues/2741429 πŸ“Œ calculateDependencies doesn't check $mode_entity if it is NULL Needs work and https://www.drupal.org/project/drupal/issues/3062441 πŸ› Can't run update.php after upgrade to 8.7.3: "Call to a member function getConfigDependencyName() on null in Drupal\Core\Entity\EntityDisplayBase->calculateDependencies()" Needs work ), those contain patches that no longer apply, one of which looks fairly involved.

@kporras07 thank you for your interest.
I have some new information:
We have some configurations that are managed by config_split as "complete split" configurations. The other option is "partial split." The error always seems to occur for "complete split" configs, but does not occur for "partial split" configs. This also seems to occur not just for pantheon secrets, but for any config key override. So, this is not really a problem with pantheon secrets per se, it most likely an issue for key config override. The steps to reproduce involve creating such a "complete split" configuration via the config_split module that you would use for different environments, and create a key config override for one of its values. Attempting to run a config export will produce the error.

This states that overrides should not be used for complete splits: https://www.drupal.org/docs/contributed-modules/configuration-split/per-... β†’ . So this is questionable as a bug, and could more likely be considered an issue that was based on how our site was set up with the splits. However, the error message was not useful in diagnosing what was happening - it is just a php error.

So the suggestion might be a better error for this situation, and better documentation.

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bob.hinrichs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024