- Issue created by @megadesk3000
- 🇨🇭Switzerland megadesk3000
I added a patch, that does the following:
In EntityComparisonController::compare() a check has been added after the Entity has been loaded.
// Go through entities. foreach ($entity_comparison_list[$entity_type][$bundle_type][$entity_comparison_id] as $entity_id) { // Get entity. $entity = $this->entityTypeManager->getStorage($entity_type)->load($entity_id); // First check if the entity still exists before accessing methods on it. if (!$entity) { // Remove the entity from the list, since it does not exist. $this->processRequest($entity_comparison, $entity_id); continue; } if ($entity->hasTranslation($this->languageManager->getCurrentLanguage()->getId())) { $entity = $entity->getTranslation($this->languageManager->getCurrentLanguage()->getId()); }
If the entity does not exist, it gets removed from the entity comparison list as well automatically.
- @megadesk3000 opened merge request.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:19am 21 July 2023