diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index a72a80a..7392a8e 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -197,7 +197,10 @@ public function __construct() { $this->discovery = new InfoHookDecorator($this->discovery, 'entity_info'); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition')); $this->discovery = new AlterDecorator($this->discovery, 'entity_info'); - $this->factory = new DefaultFactory($this->discovery); + + // Because we override getDefinitions() for caching, the discovery is not + // the canonical source of discovery. Pass the manager instead. + $this->factory = new DefaultFactory($this); // Entity type plugins includes translated strings, so each language is // cached separately.