Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 297294

ContentEntity source plugin shouldn't throw exception when the bundle key is missing

$
0
0

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.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 297294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>