Problem/Motivation
The ContentEntity
source plugin throws an exception when it is configured to use a bundleable entity as source, but the bundle
source configuration cannot match an existing bundle. IMHO this shouldn't happen.
This source plugin is used by the d7_entity_reference_translation
follow-up migrations which are (re-)generated on the fly, while the migrations are executed. See EntityReferenceTranslationDeriver
, MigrateUpgradeImportBatch
and MigrationWithFollowUpInterface
for reference. The problem is that when e.g. node migrations (and the supporting configuration migration d7_node_type
) gets rolled back, the previously generated d7_entity_reference_translation
follow-up migration derivatives still exist, but since the node_type config entities do not exist anymore, the ContentEntity
plugin throws an exception without any good reason: since it adds the bundle condition to its entity query, that will return zero rows for a missing bundle.
Steps to reproduce
See above.
Proposed resolution
Do not throw exception when the bundle
source configuration cannot match an existing bundle.