diff --git a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php index 4a5972e..9464a56 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php +++ b/core/modules/rdf/lib/Drupal/rdf/Entity/RdfMapping.php @@ -10,6 +10,7 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Entity\Annotation\EntityType; use Drupal\Core\Annotation\Translation; +use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\rdf\RdfMappingInterface; /** @@ -165,4 +166,15 @@ public function getExportProperties() { return $properties; } + /** + * {@inheritdoc} + */ + public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) { + parent::postSave($storage_controller, $update); + + if (\Drupal::entityManager()->hasController($this->targetEntityType, 'render')) { + \Drupal::entityManager()->getRenderController($this->targetEntityType)->resetCache(); + } + } + } diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php index 3de68b5..ca3ac07 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityViewControllerTest.php @@ -84,7 +84,7 @@ public function testFieldItemAttributes() { 'field_name' => 'field_test_text', 'bundle' => 'entity_test_render', ))->save(); - entity_get_display('entity_test_render', 'entity_test_render', 'full') + entity_get_display('entity_test_render', 'entity_test_render', 'default') ->setComponent('field_test_text', array('type' => 'text_default')) ->save();