Skip to content
Snippets Groups Projects

Issue #3270683: An error happen when the remote entity has been deleted

Closed Issue #3270683: An error happen when the remote entity has been deleted
1 unresolved thread
1 unresolved thread
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
@@ -310,6 +310,9 @@ class ExternalEntityStorage extends ContentEntityStorageBase implements External
$values = [];
foreach ($data as $id => $raw_data) {
if (empty($raw_data)) {
continue;
    • This is just hiding the error message, so it will render an empty entity/page.

      It should throw an exception so it can be handled better.

Please register or sign in to reply
}
$entity_values = $this->getFieldMapper()->extractEntityValuesFromRawData($raw_data);
if (!empty($entity_values)) {
$values[$id] = $entity_values;
@@ -318,6 +321,9 @@ class ExternalEntityStorage extends ContentEntityStorageBase implements External
$entities = [];
foreach ($values as $id => $entity_values) {
if (empty($data[$id])) {
continue;
}
// Allow other modules to perform custom mapping logic.
$event = new ExternalEntityMapRawDataEvent($data[$id], $entity_values);
$this->eventDispatcher->dispatch(ExternalEntitiesEvents::MAP_RAW_DATA, $event);
Loading