diff --git a/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityFormDisplay.php b/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityFormDisplay.php index 767d418..ba86256 100644 --- a/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityFormDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Plugin/Core/Entity/EntityFormDisplay.php @@ -90,9 +90,13 @@ class EntityFormDisplay extends ConfigEntityBase { * Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::__construct(). */ public function __construct(array $values, $entity_type) { - if (!isset($values['targetEntityType']) || !isset($values['bundle']) || !isset($values['formMode'])) { - throw new \InvalidArgumentException('Missing required properties for an EntityFormDisplay entity.'); - } + // @todo See http://drupal.org/node/1825044#comment-6847792: contact.module + // currently produces invalid entities with a NULL bundle in some cases. + // Add the validity checks back when http://drupal.org/node/1856556 is + // fixed. + //if (!isset($values['targetEntityType']) || !isset($values['bundle']) || !isset($values['formMode'])) { + // throw new \InvalidArgumentException('Missing required properties for an EntityFormDisplay entity.'); + //} parent::__construct($values, $entity_type); $this->originalFormMode = $this->formMode;