diff -u b/core/includes/config.inc b/core/includes/config.inc --- b/core/includes/config.inc +++ b/core/includes/config.inc @@ -83,6 +83,8 @@ $entity_manager ->getStorageController($entity_type) ->create($new_config->get()) + // Ensure that other configuration entities are not created + // automatically as a result. ->setSyncing(TRUE) ->save(); } reverted: --- b/core/profiles/standard/config/entity.display.custom_block.basic.default.yml +++ /dev/null @@ -1,12 +0,0 @@ -id: custom_block.basic.default -uuid: c3fd5543-0c77-4eac-980a-10259a370c5a -targetEntityType: custom_block -bundle: basic -mode: default -content: - body: - label: hidden - type: text_default - weight: 0 - settings: { } -status: true reverted: --- b/core/profiles/standard/config/entity.form_display.custom_block.basic.default.yml +++ /dev/null @@ -1,14 +0,0 @@ -id: custom_block.basic.default -uuid: 1d0206d5-8811-43fb-b400-c8ef35271633 -targetEntityType: custom_block -bundle: basic -mode: default -content: - body: - type: text_textarea_with_summary - weight: 0 - settings: - rows: '9' - summary_rows: '3' - placeholder: '' -status: true reverted: --- b/core/profiles/standard/config/field.field.custom_block.body.yml +++ /dev/null @@ -1,14 +0,0 @@ -id: custom_block.body -uuid: 2ba138cb-3912-4ac5-b600-c2a80d75b4e6 -status: true -langcode: en -name: body -entity_type: custom_block -type: text_with_summary -settings: { } -module: text -active: true -locked: false -cardinality: 1 -translatable: false -indexes: { } reverted: --- b/core/profiles/standard/config/field.instance.custom_block.basic.body.yml +++ /dev/null @@ -1,16 +0,0 @@ -id: custom_block.basic.body -uuid: 2ddc5722-0cde-4758-9a00-0efcda81bc7c -status: true -langcode: en -field_uuid: 2ba138cb-3912-4ac5-b600-c2a80d75b4e6 -entity_type: custom_block -bundle: basic -label: 'Block body' -description: '' -required: false -default_value: { } -default_value_function: '' -settings: - display_summary: false - text_processing: '1' -field_type: text_with_summary only in patch2: unchanged: --- /dev/null +++ b/core/modules/block/custom_block/config/entity.display.custom_block.basic.default.yml @@ -0,0 +1,12 @@ +id: custom_block.basic.default +uuid: c3fd5543-0c77-4eac-980a-10259a370c5a +targetEntityType: custom_block +bundle: basic +mode: default +content: + body: + label: hidden + type: text_default + weight: 0 + settings: { } +status: true only in patch2: unchanged: --- /dev/null +++ b/core/modules/block/custom_block/config/entity.form_display.custom_block.basic.default.yml @@ -0,0 +1,14 @@ +id: custom_block.basic.default +uuid: 1d0206d5-8811-43fb-b400-c8ef35271633 +targetEntityType: custom_block +bundle: basic +mode: default +content: + body: + type: text_textarea_with_summary + weight: 0 + settings: + rows: '9' + summary_rows: '3' + placeholder: '' +status: true only in patch2: unchanged: --- /dev/null +++ b/core/modules/block/custom_block/config/field.field.custom_block.body.yml @@ -0,0 +1,14 @@ +id: custom_block.body +uuid: 2ba138cb-3912-4ac5-b600-c2a80d75b4e6 +status: true +langcode: en +name: body +entity_type: custom_block +type: text_with_summary +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } only in patch2: unchanged: --- /dev/null +++ b/core/modules/block/custom_block/config/field.instance.custom_block.basic.body.yml @@ -0,0 +1,16 @@ +id: custom_block.basic.body +uuid: 2ddc5722-0cde-4758-9a00-0efcda81bc7c +status: true +langcode: en +field_uuid: 2ba138cb-3912-4ac5-b600-c2a80d75b4e6 +entity_type: custom_block +bundle: basic +label: 'Block body' +description: '' +required: false +default_value: { } +default_value_function: '' +settings: + display_summary: false + text_processing: '1' +field_type: text_with_summary only in patch2: unchanged: --- /dev/null +++ b/core/modules/book/config/entity.display.node.book.default.yml @@ -0,0 +1,12 @@ +id: node.book.default +uuid: f6ec2c4d-adb7-40b8-8600-a27dacb3ec9c +targetEntityType: node +bundle: book +mode: default +content: + body_book: + label: hidden + type: text_default + weight: 0 + settings: { } +status: true only in patch2: unchanged: --- /dev/null +++ b/core/modules/book/config/entity.display.node.book.teaser.yml @@ -0,0 +1,13 @@ +id: node.book.teaser +uuid: 26ee1cf3-9572-454f-8300-ea72eaf8f6cf +targetEntityType: node +bundle: book +mode: teaser +content: + body_book: + label: hidden + type: text_summary_or_trimmed + weight: 0 + settings: + trim_length: '600' +status: true only in patch2: unchanged: --- /dev/null +++ b/core/modules/book/config/entity.form_display.node.book.default.yml @@ -0,0 +1,14 @@ +id: node.book.default +uuid: fb674daa-0584-464b-ae3b-596e9dcb5a2e +targetEntityType: node +bundle: book +mode: default +content: + body_book: + type: text_textarea_with_summary + weight: 0 + settings: + rows: '9' + summary_rows: '3' + placeholder: '' +status: true only in patch2: unchanged: --- /dev/null +++ b/core/modules/book/config/field.field.node.body_book.yml @@ -0,0 +1,14 @@ +id: node.body_book +uuid: 39066f07-7daa-4b87-a300-df15339bce54 +status: true +langcode: en +name: body_book +entity_type: node +type: text_with_summary +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } only in patch2: unchanged: --- /dev/null +++ b/core/modules/book/config/field.instance.node.book.body_book.yml @@ -0,0 +1,16 @@ +id: node.book.body_book +uuid: 97d9bcc5-4f0c-4e07-8f39-577e2ab76ed4 +status: true +langcode: en +field_uuid: 39066f07-7daa-4b87-a300-df15339bce54 +entity_type: node +bundle: book +label: Body +description: '' +required: false +default_value: { } +default_value_function: '' +settings: + display_summary: true + text_processing: '1' +field_type: text_with_summary only in patch2: unchanged: --- a/core/modules/book/lib/Drupal/book/Tests/BookTest.php +++ b/core/modules/book/lib/Drupal/book/Tests/BookTest.php @@ -206,7 +206,7 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F // Check printer friendly version. $this->drupalGet('book/export/html/' . $node->id()); $this->assertText($node->label(), 'Printer friendly title found.'); - $this->assertRaw($node->body->processed, 'Printer friendly body found.'); + $this->assertRaw($node->body_book->processed, 'Printer friendly body found.'); $number++; } @@ -244,7 +244,7 @@ function createBookNode($book_nid, $parent = NULL) { $edit = array(); $edit["title"] = $number . ' - SimpleTest test node ' . $this->randomName(10); - $edit['body[0][value]'] = 'SimpleTest test body ' . $this->randomName(32) . ' ' . $this->randomName(32); + $edit['body_book[0][value]'] = 'SimpleTest test body ' . $this->randomName(32) . ' ' . $this->randomName(32); $edit['book[bid]'] = $book_nid; if ($parent !== NULL) { @@ -280,7 +280,7 @@ function testBookExport() { // Make sure each part of the book is there. foreach ($nodes as $node) { $this->assertText($node->label(), 'Node title found in printer friendly version.'); - $this->assertRaw($node->body->processed, 'Node body found in printer friendly version.'); + $this->assertRaw($node->body_book->processed, 'Node body found in printer friendly version.'); } // Make sure we can't export an unsupported format. only in patch2: unchanged: --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php @@ -118,6 +118,10 @@ function testCRUD() { $this->fail('EntityMalformedException was not thrown.'); } + // Verify that this is syncing flag was not set during a normal save of a + // config entity. + $this->assertIdentical(\Drupal::state()->get('ConfigTestIsSyncing'), FALSE, 'During config entity save, isSyncing property on ConfigTest entity is set to TRUE.'); + // Verify that the correct status is returned and properties did not change. $this->assertIdentical($status, SAVED_NEW); $this->assertIdentical($config_test->id(), $expected['id']); only in patch2: unchanged: --- a/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigInstallTest.php @@ -52,6 +52,10 @@ function testModuleInstallation() { $config = \Drupal::config($default_configuration_entity); $this->assertIdentical($config->isNew(), FALSE); + // Verify that this is syncing flag was set during module install creating + // a default config entity. + $this->assertIdentical(\Drupal::state()->get('ConfigTestIsSyncing'), TRUE, 'During module install, isSyncing property on ConfigTest entity is not set.'); + // Verify that config_test API hooks were invoked for the dynamic default // configuration entity. $this->assertFalse(isset($GLOBALS['hook_config_test']['load'])); only in patch2: unchanged: --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php @@ -8,6 +8,7 @@ namespace Drupal\config_test\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; +use Drupal\Core\Entity\EntityStorageControllerInterface; use Drupal\Core\Entity\Annotation\EntityType; use Drupal\Core\Annotation\Translation; use Drupal\config_test\ConfigTestInterface; @@ -105,4 +106,10 @@ public static function sort($a, $b) { return parent::sort($a, $b); } + /** + * {@inheritdoc} + */ + public function postSave(EntityStorageControllerInterface $storage_controller, $update = TRUE) { + \Drupal::state()->set('ConfigTestIsSyncing', $this->isSyncing()); + } } only in patch2: unchanged: --- a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php +++ b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php @@ -371,7 +371,7 @@ private function getContent($type) { $content = array( 'title' => $this->randomName(8), 'taxonomy_forums' => array(1), - 'body[0][value]' => $this->randomName(32), + 'body_forum[0][value]' => $this->randomName(32), ); break; @@ -395,8 +395,14 @@ private function getContent($type) { * Random content needed by various node types. */ private function getContentUpdate($type) { + if ($type == 'forum') { + $field_name = 'body_forum[0][value]'; + } + else { + $field_name = 'body[0][value]'; + } $content = array( - 'body[0][value]' => $this->randomName(32), + $field_name => $this->randomName(32), ); return $content; } only in patch2: unchanged: --- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleApiTest.php @@ -198,6 +198,7 @@ function testDependencyResolution() { // sure that Drupal\Core\Extension\ModuleHandler::install() still works. \Drupal::state()->set('module_test.dependency', 'version dependency'); drupal_static_reset('system_rebuild_module_data'); + \Drupal::service('config.factory')->reset(); $result = \Drupal::moduleHandler()->install(array('forum')); $this->assertTrue($result, '\Drupal\Core\Extension\ModuleHandler::install() returns the correct value.'); // Verify that the fake dependency chain was installed.