diff --git a/composer.json b/composer.json index 0562455beca4025dbaf72c617e744cfd71859248..1a392f6d643da2540665116d6f5efcc47e43f586 100644 --- a/composer.json +++ b/composer.json @@ -289,6 +289,9 @@ "2881745": "patches/entity_embed_2881745-22.patch", "2511404": "patches/entity-embed-img-link-2511404-68.patch" }, + "drupal/focal_point": { + "3106445": "https://www.drupal.org/files/issues/2020-01-23/Focal_point-Referential_Integrity-3106445-4.patch" + }, "drupal/linkit": { "2712951": "https://www.drupal.org/files/issues/2019-11-27/linkit_for_link_field-2712951-140.patch" }, diff --git a/composer.lock b/composer.lock index 28ad04c7660c7b84e9aaefd4c4e0f53a5a1a0a0a..fd58f4396839813c4a9dd5201d7ab9e636712b47 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4d9c06944885f9bb9d568724fdf5445a", + "content-hash": "f3f9a51e6c09cc6554fa012dbf1ad64d", "packages": [ { "name": "alchemy/zippy", @@ -5010,6 +5010,9 @@ "status": "covered", "message": "Covered by Drupal's security advisory policy" } + }, + "patches_applied": { + "3106445": "https://www.drupal.org/files/issues/2020-01-23/Focal_point-Referential_Integrity-3106445-4.patch" } }, "notification-url": "https://packages.drupal.org/8/downloads", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 430e46999fcc1ee1bdf7a22e9b2f41be081372bf..1dcf950ce4129566464e6f27ae1a5efed7f4661c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -5159,6 +5159,9 @@ "status": "covered", "message": "Covered by Drupal's security advisory policy" } + }, + "patches_applied": { + "3106445": "https://www.drupal.org/files/issues/2020-01-23/Focal_point-Referential_Integrity-3106445-4.patch" } }, "installation-source": "dist", diff --git a/web/modules/focal_point/focal_point.module b/web/modules/focal_point/focal_point.module index 8c591e65019dfcef86434c2fb1e5242487589d45..b5ceb2c174e7f3250eb1340e3df694d45c584e2a 100644 --- a/web/modules/focal_point/focal_point.module +++ b/web/modules/focal_point/focal_point.module @@ -11,6 +11,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\file\FileInterface; /** * Implements hook_help(). @@ -66,6 +67,9 @@ function focal_point_entity_update(EntityInterface $entity) { foreach ($entity->{$field->getName()} as $item) { /** @var \Drupal\focal_point\FocalPointManagerInterface $focal_point_manager */ $focal_point_manager = \Drupal::service('focal_point.manager'); + if (!$item->entity instanceof FileInterface) { + continue; + } $crop = $focal_point_manager->getCropEntity($item->entity, $crop_type); $focal_point = NULL;