diff -u b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php --- b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php @@ -101,16 +101,6 @@ /** * {@inheritdoc} */ - public function preSave(EntityStorageControllerInterface $storage_controller) { - parent::preSave($storage_controller); - $this->createDependency('theme', $this->theme); - // Before saving the custom block, set changed time. - $this->set('changed', REQUEST_TIME); - } - - /** - * {@inheritdoc} - */ public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) { parent::postSave($storage_controller, $update); diff -u b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php --- b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php @@ -95,7 +95,7 @@ 'weight' => NULL, 'status' => TRUE, 'langcode' => language_default()->id, - 'dependencies' => array('module' => array('block_test')), + 'dependencies' => array('module' => array('block_test'), 'theme' => array('stark')), 'theme' => 'stark', 'region' => '-1', 'plugin' => 'test_html', diff -u b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php --- b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php +++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php @@ -160,11 +160,15 @@ $bundle_entity = entity_load($bundle_entity_type_id, $this->bundle); $this->createDependency('entity', $bundle_entity->getConfigDependencyName()); } - foreach ($this->content as $field_name => $value) { + foreach ($this->content as $field_name => $component) { $field_instance = Field::fieldInfo()->getInstance($this->targetEntityType, $this->bundle, $field_name); if ($field_instance) { $this->createDependency('entity', $field_instance->getConfigDependencyName()); } + if (isset($component['type'])) { + $definition = $this->pluginManager->getDefinition($component['type']); + $this->createDependency('module', $definition['provider']); + } } // Depend on configured modes. if ($this->mode != 'default') { diff -u b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php @@ -78,8 +78,9 @@ */ public function testBlockHooks() { $entity = entity_create('block', array( - 'id' => 'stark.test_html', + 'id' => 'stark_test_html', 'plugin' => 'test_html', + 'theme' => 'stark', )); $this->assertHookMessageOrder(array( diff -u b/core/profiles/standard/config/entity.form_display.node.article.default.yml b/core/profiles/standard/config/entity.form_display.node.article.default.yml --- b/core/profiles/standard/config/entity.form_display.node.article.default.yml +++ b/core/profiles/standard/config/entity.form_display.node.article.default.yml @@ -41,0 +42,5 @@ + module: + - text + - comment + - taxonomy + - image diff -u b/core/profiles/standard/config/entity.view_display.node.article.default.yml b/core/profiles/standard/config/entity.view_display.node.article.default.yml --- b/core/profiles/standard/config/entity.view_display.node.article.default.yml +++ b/core/profiles/standard/config/entity.view_display.node.article.default.yml @@ -26,0 +27,8 @@ + - field.instance.node.article.field_image + - field.instance.node.article.body + - field.instance.node.article.field_tags + module: + - image + - text + - taxonomy + - comment diff -u b/core/profiles/standard/config/entity.view_display.node.article.teaser.yml b/core/profiles/standard/config/entity.view_display.node.article.teaser.yml --- b/core/profiles/standard/config/entity.view_display.node.article.teaser.yml +++ b/core/profiles/standard/config/entity.view_display.node.article.teaser.yml @@ -31,0 +32,4 @@ + module: + - image + - text + - taxonomy only in patch2: unchanged: --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php +++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityDisplayTest.php @@ -14,7 +14,7 @@ */ class EntityDisplayTest extends DrupalUnitTestBase { - public static $modules = array('entity', 'field', 'entity_test', 'user', 'text'); + public static $modules = array('entity', 'field', 'entity_test', 'user', 'text', 'entity_test'); public static function getInfo() { return array( @@ -76,6 +76,7 @@ public function testEntityDisplayCRUD() { // Check that CreateCopy() creates a new component that can be correclty // saved. + entity_create('view_mode', array('id' => $display->targetEntityType .'.other_view_mode', 'targetEntityType' => $display->targetEntityType))->save(); $new_display = $display->createCopy('other_view_mode'); $new_display->save(); $new_display = entity_load('entity_view_display', $new_display->id()); @@ -317,6 +318,7 @@ public function testDeleteFieldInstance() { $instance->save(); // Create default and teaser entity display. + entity_create('view_mode', array('id' => 'entity_test.teaser', 'targetEntityType' => 'entity_test'))->save(); entity_create('entity_view_display', array( 'targetEntityType' => 'entity_test', 'bundle' => 'entity_test', only in patch2: unchanged: --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityFormDisplayTest.php +++ b/core/modules/entity/lib/Drupal/entity/Tests/EntityFormDisplayTest.php @@ -199,6 +199,7 @@ public function testDeleteFieldInstance() { $instance->save(); // Create default and compact entity display. + entity_create('form_mode', array('id' => 'entity_test.compact', 'targetEntityType' => 'entity_test'))->save(); entity_create('entity_form_display', array( 'targetEntityType' => 'entity_test', 'bundle' => 'entity_test', only in patch2: unchanged: --- a/core/modules/field/lib/Drupal/field/Tests/DisplayApiTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/DisplayApiTest.php @@ -104,6 +104,7 @@ function setUp() { ->setComponent($this->field_name, $this->display_options['default']) ->save(); // Create a display for the teaser view mode. + entity_create('view_mode', array('id' => 'entity_test.teaser', 'targetEntityType' => 'entity_test'))->save(); entity_get_display($instance['entity_type'], $instance['bundle'], 'teaser') ->setComponent($this->field_name, $this->display_options['teaser']) ->save(); only in patch2: unchanged: --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -446,12 +446,18 @@ function node_add_body_field(NodeTypeInterface $type, $label = 'Body') { 'type' => 'text_default', )) ->save(); - entity_get_display('node', $type->type, 'teaser') - ->setComponent('body', array( - 'label' => 'hidden', - 'type' => 'text_summary_or_trimmed', - )) - ->save(); + + // The teaser view mode is created by the Standard profile are therefore + // might not exist. + $view_modes = entity_get_view_modes('node'); + if (isset($view_modes['teaser'])) { + entity_get_display('node', $type->type, 'teaser') + ->setComponent('body', array( + 'label' => 'hidden', + 'type' => 'text_summary_or_trimmed', + )) + ->save(); + } } return $instance; only in patch2: unchanged: --- a/core/profiles/standard/config/entity.form_display.user.user.default.yml +++ b/core/profiles/standard/config/entity.form_display.user.user.default.yml @@ -10,3 +10,6 @@ content: preview_image_style: thumbnail weight: -1 status: true +dependencies: + module: + - image only in patch2: unchanged: --- a/core/profiles/standard/config/entity.view_display.user.user.compact.yml +++ b/core/profiles/standard/config/entity.view_display.user.user.compact.yml @@ -13,3 +13,8 @@ content: hidden: member_for: true status: true +dependencies: + module: + - image + entity: + - entity.view_mode.user.compact only in patch2: unchanged: --- a/core/profiles/standard/config/entity.view_display.user.user.default.yml +++ b/core/profiles/standard/config/entity.view_display.user.user.default.yml @@ -11,3 +11,6 @@ content: image_link: content weight: 0 status: true +dependencies: + module: + - image