Issue #2143797 by agentrickard, amateescu: GetDefaultValue() fails with ConfigurableEntityReferenceFieldItemList.

8.0.x
Nathaniel Catchpole 2013-12-03 13:39:18 +00:00
parent b925d4a4de
commit 9c2b1650c7
1 changed files with 4 additions and 1 deletions

View File

@ -27,9 +27,12 @@ class TaxonomyTermReferenceFieldItemList extends LegacyConfigFieldItemList {
$uuids[$delta] = $properties['target_uuid'];
}
if ($uuids) {
$entity_ids = \Drupal::entityQuery('taxonomy_term')
->condition('uuid', $uuids, 'IN')
->execute();
$entities = \Drupal::entityManager()
->getStorageController('taxonomy_term')
->loadByProperties(array('uuid' => $uuids));
->loadMultiple($entity_ids);
foreach ($entities as $id => $entity) {
$entity_ids[$entity->uuid()] = $id;