During a configuration import, the Entity system performs validation to ensure that bundles are not deleted if they are in use on the target site. The current code for this validation assumes that the storage for all validated bundles will return a usable query via the getQuery() method. However, this is not the case for bundles using ContentEntityNullStorage (which appears to be used by contact forms). Such bundles will cause a QueryException to be thrown, breaking the import process.
Take advantage of the fact that most bundles (seemingly all those currently defined in core) use a storage mechanism that supports the hasData() method (as specified by the DynamicallyFieldableEntityStorageInterface interface). When checking for existing entities for a given bundle, use hasData() if supported by the bundle's storage mechanism. If not, only then fall back to the current approach and attempt to build and execute an entity query.
- Discuss alternate solutions and related issues
- Determine whether this issue will be obviated by other ongoing work
User interface changes