diff --git a/core/includes/config.inc b/core/includes/config.inc index 8e9ce5e..c3822dc 100644 --- a/core/includes/config.inc +++ b/core/includes/config.inc @@ -83,6 +83,7 @@ function ($value) use ($name) { $entity_manager ->getStorageController($entity_type) ->create($new_config->get()) + ->setSyncing(TRUE) ->save(); } else { diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index a988135..49090b5 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -131,6 +131,7 @@ public function status() { */ public function setSyncing($syncing) { $this->isSyncing = $syncing; + return $this; } /** diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php index 5aa737d..c38564a 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php @@ -64,6 +64,9 @@ public function setStatus($status); * * @param bool $status * The status of the sync flag. + * + * @return \Drupal\Core\Config\Entity\ConfigEntityInterface + * The configuration entity. */ public function setSyncing($status); diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php index 8321d70..da4e1c2 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlockType.php @@ -87,7 +87,9 @@ public function postSave(EntityStorageControllerInterface $storage_controller, $ if (!$update) { entity_invoke_bundle_hook('create', 'custom_block', $this->id()); - custom_block_add_body_field($this->id); + if (!$this->isSyncing()) { + custom_block_add_body_field($this->id); + } } elseif ($this->getOriginalId() != $this->id) { entity_invoke_bundle_hook('rename', 'custom_block', $this->getOriginalId(), $this->id); diff --git a/core/modules/forum/config/entity.display.comment.node__comment_forum.default.yml b/core/modules/forum/config/entity.display.comment.node__comment_forum.default.yml new file mode 100644 index 0000000..1911996 --- /dev/null +++ b/core/modules/forum/config/entity.display.comment.node__comment_forum.default.yml @@ -0,0 +1,12 @@ +id: comment.node__comment_forum.default +uuid: 472db8c3-6821-49bf-8e00-e5b2116bfe42 +targetEntityType: comment +bundle: node__comment_forum +mode: default +content: + comment_forum_body: + label: hidden + type: text_default + weight: 0 + settings: { } +status: true diff --git a/core/modules/forum/config/entity.display.node.forum.default.yml b/core/modules/forum/config/entity.display.node.forum.default.yml new file mode 100644 index 0000000..855c02c --- /dev/null +++ b/core/modules/forum/config/entity.display.node.forum.default.yml @@ -0,0 +1,22 @@ +id: node.forum.default +uuid: 78a4745a-dd44-4b8c-9d2b-43bee0dd0f4e +targetEntityType: node +bundle: forum +mode: default +content: + body_forum: + label: hidden + type: text_default + weight: 0 + settings: { } + taxonomy_forums: + type: taxonomy_term_reference_link + weight: 10 + label: above + settings: { } + comment_forum: + label: hidden + type: comment_default + weight: 20 + settings: { } +status: true diff --git a/core/modules/forum/config/entity.display.node.forum.teaser.yml b/core/modules/forum/config/entity.display.node.forum.teaser.yml new file mode 100644 index 0000000..cf29831 --- /dev/null +++ b/core/modules/forum/config/entity.display.node.forum.teaser.yml @@ -0,0 +1,18 @@ +id: node.forum.teaser +uuid: d39ee7e9-da8e-4627-a608-8f92904fd7d3 +targetEntityType: node +bundle: forum +mode: teaser +content: + body_forum: + label: hidden + type: text_summary_or_trimmed + weight: 0 + settings: + trim_length: '600' + taxonomy_forums: + type: taxonomy_term_reference_link + weight: 10 + label: above + settings: { } +status: true diff --git a/core/modules/forum/config/entity.form_display.comment.node__comment_forum.default.yml b/core/modules/forum/config/entity.form_display.comment.node__comment_forum.default.yml new file mode 100644 index 0000000..b89ee1d --- /dev/null +++ b/core/modules/forum/config/entity.form_display.comment.node__comment_forum.default.yml @@ -0,0 +1,13 @@ +id: comment.node__comment_forum.default +uuid: be2e3356-152c-42f7-af00-b73ee6ca95ec +targetEntityType: comment +bundle: node__comment_forum +mode: default +content: + comment_forum_body: + type: text_textarea + weight: 0 + settings: + rows: '5' + placeholder: '' +status: true diff --git a/core/modules/forum/config/entity.form_display.node.forum.default.yml b/core/modules/forum/config/entity.form_display.node.forum.default.yml new file mode 100644 index 0000000..6b35e48 --- /dev/null +++ b/core/modules/forum/config/entity.form_display.node.forum.default.yml @@ -0,0 +1,22 @@ +id: node.forum.default +uuid: d143d88d-881d-4872-9109-098cca9567e5 +targetEntityType: node +bundle: forum +mode: default +content: + body_forum: + type: text_textarea_with_summary + weight: 0 + settings: + rows: '9' + summary_rows: '3' + placeholder: '' + taxonomy_forums: + type: options_select + weight: 1 + settings: { } + comment_forum: + type: comment_default + weight: 20 + settings: { } +status: true diff --git a/core/modules/forum/config/field.field.comment.comment_forum_body.yml b/core/modules/forum/config/field.field.comment.comment_forum_body.yml new file mode 100644 index 0000000..e4156a7 --- /dev/null +++ b/core/modules/forum/config/field.field.comment.comment_forum_body.yml @@ -0,0 +1,14 @@ +id: comment.comment_forum_body +uuid: 4bf5c26d-3e8d-43d6-8309-9d27a4b5b1f6 +status: true +langcode: en +name: comment_forum_body +entity_type: comment +type: text_long +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } diff --git a/core/modules/forum/config/field.field.node.body_forum.yml b/core/modules/forum/config/field.field.node.body_forum.yml new file mode 100644 index 0000000..727bdfa --- /dev/null +++ b/core/modules/forum/config/field.field.node.body_forum.yml @@ -0,0 +1,14 @@ +id: node.body_forum +uuid: e421a84b-ac0d-4a13-9216-22101fe0cbe5 +status: true +langcode: en +name: body_forum +entity_type: node +type: text_with_summary +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } diff --git a/core/modules/forum/config/field.field.node.comment_forum.yml b/core/modules/forum/config/field.field.node.comment_forum.yml new file mode 100644 index 0000000..0f21f20 --- /dev/null +++ b/core/modules/forum/config/field.field.node.comment_forum.yml @@ -0,0 +1,14 @@ +id: node.comment_forum +uuid: 99319038-79ae-431e-bd2b-43f94641c5d3 +status: true +langcode: en +name: comment_forum +entity_type: node +type: comment +settings: { } +module: comment +active: true +locked: false +cardinality: 1 +translatable: '0' +indexes: { } diff --git a/core/modules/forum/config/field.field.node.taxonomy_forums.yml b/core/modules/forum/config/field.field.node.taxonomy_forums.yml new file mode 100644 index 0000000..5f02443 --- /dev/null +++ b/core/modules/forum/config/field.field.node.taxonomy_forums.yml @@ -0,0 +1,19 @@ +id: node.taxonomy_forums +uuid: fc129f40-9ea7-4e9f-9004-4d3bdb6d0c06 +status: true +langcode: en +name: taxonomy_forums +entity_type: node +type: taxonomy_term_reference +settings: + allowed_values: + - + vocabulary: forums + parent: 0 + options_list_callback: null +module: taxonomy +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } diff --git a/core/modules/forum/config/field.field.taxonomy_term.forum_container.yml b/core/modules/forum/config/field.field.taxonomy_term.forum_container.yml new file mode 100644 index 0000000..f0048e8 --- /dev/null +++ b/core/modules/forum/config/field.field.taxonomy_term.forum_container.yml @@ -0,0 +1,18 @@ +id: taxonomy_term.forum_container +uuid: babf2ba1-505f-4c71-8a07-7be19f4fb9f3 +status: '1' +langcode: en +name: forum_container +entity_type: taxonomy_term +type: list_boolean +settings: + allowed_values: + - '' + - '' + allowed_values_function: '' +module: options +active: true +locked: '1' +cardinality: '1' +translatable: '0' +indexes: { } diff --git a/core/modules/forum/config/field.instance.comment.node__comment_forum.comment_body.yml b/core/modules/forum/config/field.instance.comment.node__comment_forum.comment_body.yml new file mode 100644 index 0000000..2eb4e00 --- /dev/null +++ b/core/modules/forum/config/field.instance.comment.node__comment_forum.comment_body.yml @@ -0,0 +1,15 @@ +id: comment.node__comment_forum.comment_forum_body +uuid: 32e7519e-4fce-411f-8500-e6ec8af0dda4 +status: true +langcode: en +field_uuid: 4bf5c26d-3e8d-43d6-8309-9d27a4b5b1f6 +entity_type: comment +bundle: node__comment_forum +label: Comment +description: '' +required: true +default_value: { } +default_value_function: '' +settings: + text_processing: 1 +field_type: text_long diff --git a/core/modules/forum/config/field.instance.node.forum.body_forum.yml b/core/modules/forum/config/field.instance.node.forum.body_forum.yml new file mode 100644 index 0000000..f73456b --- /dev/null +++ b/core/modules/forum/config/field.instance.node.forum.body_forum.yml @@ -0,0 +1,16 @@ +id: node.forum.body_forum +uuid: 1dfe3c99-6525-423a-8c00-a939702bbb63 +status: true +langcode: en +field_uuid: e421a84b-ac0d-4a13-9216-22101fe0cbe5 +entity_type: node +bundle: forum +label: Body +description: '' +required: false +default_value: { } +default_value_function: '' +settings: + display_summary: true + text_processing: '1' +field_type: text_with_summary diff --git a/core/modules/forum/config/field.instance.node.forum.comment_forum.yml b/core/modules/forum/config/field.instance.node.forum.comment_forum.yml new file mode 100644 index 0000000..2690efe --- /dev/null +++ b/core/modules/forum/config/field.instance.node.forum.comment_forum.yml @@ -0,0 +1,27 @@ +id: node.forum.comment_forum +uuid: 45f0d3b3-4807-47cd-a619-25f4941c7843 +status: true +langcode: en +field_uuid: 99319038-79ae-431e-bd2b-43f94641c5d3 +entity_type: node +bundle: forum +label: 'Comment settings' +description: '' +required: 1 +default_value: + - + status: 2 + cid: 0 + last_comment_timestamp: 0 + last_comment_name: '' + last_comment_uid: 0 + comment_count: 0 +default_value_function: '' +settings: + default_mode: 1 + per_page: 50 + form_location: 1 + anonymous: 0 + subject: 1 + preview: 1 +field_type: comment diff --git a/core/modules/forum/config/field.instance.node.forum.taxonomy_forums.yml b/core/modules/forum/config/field.instance.node.forum.taxonomy_forums.yml new file mode 100644 index 0000000..52d11ae --- /dev/null +++ b/core/modules/forum/config/field.instance.node.forum.taxonomy_forums.yml @@ -0,0 +1,14 @@ +id: node.forum.taxonomy_forums +uuid: 65004fcc-4be7-4142-8a00-e501d1676655 +status: true +langcode: en +field_uuid: fc129f40-9ea7-4e9f-9004-4d3bdb6d0c06 +entity_type: node +bundle: forum +label: Forums +description: '' +required: true +default_value: { } +default_value_function: '' +settings: { } +field_type: taxonomy_term_reference diff --git a/core/modules/forum/config/rdf.mapping.node.forum.yml b/core/modules/forum/config/rdf.mapping.node.forum.yml index a533d92..7238408 100644 --- a/core/modules/forum/config/rdf.mapping.node.forum.yml +++ b/core/modules/forum/config/rdf.mapping.node.forum.yml @@ -18,7 +18,7 @@ fieldMappings: - 'schema:dateModified' datatype_callback: callable: 'date_iso8601' - body: + body_forum: properties: - 'schema:text' uid: diff --git a/core/modules/forum/forum.install b/core/modules/forum/forum.install index 3f7d02b..8be18f2 100644 --- a/core/modules/forum/forum.install +++ b/core/modules/forum/forum.install @@ -18,25 +18,9 @@ function forum_install() { $locked['forum'] = 'forum'; \Drupal::state()->set('node.type.locked', $locked); - // Create the 'taxonomy_forums' field if it doesn't already exist. If forum - // is being enabled at the same time as taxonomy after both modules have been - // enabled, the field might exist but still be marked inactive. - if (!field_read_field('node', 'taxonomy_forums', array('include_inactive' => TRUE))) { - entity_create('field_entity', array( - 'name' => 'taxonomy_forums', - 'entity_type' => 'node', - 'type' => 'taxonomy_term_reference', - 'settings' => array( - 'allowed_values' => array( - array( - 'vocabulary' => 'forums', - 'parent' => 0, - ), - ), - ), - ))->save(); - - // Create a default forum so forum posts can be created. + // Create a default forum so forum posts can be created if there are no terms. + $terms = entity_load_multiple_by_properties('taxonomy_term', array('vid' => 'forums')); + if (count($terms == 0)) { $term = entity_create('taxonomy_term', array( 'name' => t('General discussion'), 'langcode' => language_default()->id, @@ -46,46 +30,6 @@ function forum_install() { 'forum_container' => 0, )); $term->save(); - - // Create the instance on the bundle. - entity_create('field_instance', array( - 'field_name' => 'taxonomy_forums', - 'entity_type' => 'node', - 'label' => 'Forums', - 'bundle' => 'forum', - 'required' => TRUE, - ))->save(); - - // Assign form display settings for the 'default' form mode. - entity_get_form_display('node', 'forum', 'default') - ->setComponent('taxonomy_forums', array( - 'type' => 'options_select', - )) - ->save(); - - // Assign display settings for the 'default' and 'teaser' view modes. - entity_get_display('node', 'forum', 'default') - ->setComponent('taxonomy_forums', array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, - )) - ->save(); - entity_get_display('node', 'forum', 'teaser') - ->setComponent('taxonomy_forums', array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, - )) - ->save(); - } - // Add the comment field to the forum node type. - $fields = entity_load_multiple_by_properties('field_entity', array( - 'type' => 'comment', - 'name' => 'comment_forum', - 'include_inactive' => TRUE, - 'include_deleted' => FALSE, - )); - if (empty($fields)) { - Drupal::service('comment.manager')->addDefaultField('node', 'forum', 'comment_forum', COMMENT_OPEN); } } diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php index dda30f1..383e295 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumBlockTest.php @@ -108,7 +108,7 @@ public function testActiveForumTopicsBlock() { 'entity_type' => 'node', 'node_type' => 'node_type_' . $node->bundle(), 'subject' => $this->randomString(20), - 'comment_body' => $this->randomString(256), + 'comment_forum_body' => $this->randomString(256), 'created' => $date->getTimestamp(), )); $comment->save(); @@ -171,7 +171,7 @@ protected function createForumTopics($count = 5) { $edit = array( 'title' => $title, - 'body[0][value]' => $body, + 'body_forum[0][value]' => $body, // Forum posts are ordered by timestamp, so force a unique timestamp by // adding the index. 'date[date]' => $date->format('Y-m-d'), diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php index 3cc01d2..c96bb6c 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php @@ -48,7 +48,7 @@ function testForumIndexStatus() { $title = $this->randomName(20); $edit = array( 'title' => $title, - 'body[0][value]' => $this->randomName(200), + 'body_forum[0][value]' => $this->randomName(200), ); // Create the forum topic, preselecting the forum ID via a URL parameter. diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php index 489cc1b..ebe2a8f 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumNodeAccessTest.php @@ -53,7 +53,7 @@ function testForumNodeAccess() { $private_node_title = $this->randomName(20); $edit = array( 'title' => $private_node_title, - 'body[0][value]' => $this->randomName(200), + 'body_forum[0][value]' => $this->randomName(200), 'private' => TRUE, ); $this->drupalPostForm('node/add/forum', $edit, t('Save'), array('query' => array('forum_id' => 1))); @@ -64,7 +64,7 @@ function testForumNodeAccess() { $public_node_title = $this->randomName(20); $edit = array( 'title' => $public_node_title, - 'body[0][value]' => $this->randomName(200), + 'body_forum[0][value]' => $this->randomName(200), ); $this->drupalPostForm('node/add/forum', $edit, t('Save'), array('query' => array('forum_id' => 1))); $public_node = $this->drupalGetNodeByTitle($public_node_title); diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php index 81d8d82..30380d9 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php @@ -187,7 +187,7 @@ function testForum() { // Test adding a comment to a forum topic. $node = $this->createForumTopic($this->forum, FALSE); $edit = array(); - $edit['comment_body[0][value]'] = $this->randomName(); + $edit['comment_forum_body[0][value]'] = $this->randomName(); $this->drupalPostForm('node/' . $node->id(), $edit, t('Save')); $this->assertResponse(200); @@ -223,7 +223,7 @@ function testAddOrphanTopic() { // Create an orphan forum item. $this->drupalLogin($this->admin_user); - $this->drupalPostForm('node/add/forum', array('title' => $this->randomName(10), 'body[0][value]' => $this->randomName(120)), t('Save')); + $this->drupalPostForm('node/add/forum', array('title' => $this->randomName(10), 'body_forum[0][value]' => $this->randomName(120)), t('Save')); $nid_count = db_query('SELECT COUNT(nid) FROM {node}')->fetchField(); $this->assertEqual(0, $nid_count, 'A forum node was not created when missing a forum vocabulary.'); @@ -453,7 +453,7 @@ function testForumWithNewPost() { // Post a reply to the topic. $edit = array(); $edit['subject'] = $this->randomName(); - $edit['comment_body[0][value]'] = $this->randomName(); + $edit['comment_forum_body[0][value]'] = $this->randomName(); $this->drupalPostForm('node/' . $node->id(), $edit, t('Save')); $this->assertResponse(200); @@ -482,7 +482,7 @@ function createForumTopic($forum, $container = FALSE) { $edit = array( 'title' => $title, - 'body[0][value]' => $body, + 'body_forum[0][value]' => $body, ); $tid = $forum['tid']; @@ -570,7 +570,7 @@ private function verifyForums($node_user, EntityInterface $node, $admin, $respon // Edit forum node (including moving it to another forum). $edit = array(); $edit['title'] = 'node/' . $node->id(); - $edit['body[0][value]'] = $this->randomName(256); + $edit['body_forum[0][value]'] = $this->randomName(256); // Assume the topic is initially associated with $forum. $edit['taxonomy_forums'] = $this->root_forum['tid']; $edit['shadow'] = TRUE; diff --git a/core/profiles/standard/config/entity.display.comment.node__comment.default.yml b/core/profiles/standard/config/entity.display.comment.node__comment.default.yml new file mode 100644 index 0000000..f31f202 --- /dev/null +++ b/core/profiles/standard/config/entity.display.comment.node__comment.default.yml @@ -0,0 +1,12 @@ +id: comment.node__comment.default +uuid: 8a95b3fc-cf36-4df6-b25e-94d6d62d9a60 +targetEntityType: comment +bundle: node__comment +mode: default +content: + comment_body: + label: hidden + type: text_default + weight: 0 + settings: { } +status: true diff --git a/core/profiles/standard/config/entity.display.custom_block.basic.default.yml b/core/profiles/standard/config/entity.display.custom_block.basic.default.yml new file mode 100644 index 0000000..9fed337 --- /dev/null +++ b/core/profiles/standard/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 diff --git a/core/profiles/standard/config/entity.display.node.article.default.yml b/core/profiles/standard/config/entity.display.node.article.default.yml index 33d77f0..44a11da 100644 --- a/core/profiles/standard/config/entity.display.node.article.default.yml +++ b/core/profiles/standard/config/entity.display.node.article.default.yml @@ -3,12 +3,11 @@ uuid: 3ca9876e-7b93-48bd-8f00-b4ce293ad554 targetEntityType: node bundle: article mode: default -status: 1 content: body: label: hidden type: text_default - weight: '0' + weight: 11 settings: { } field_tags: type: taxonomy_term_reference_link @@ -22,3 +21,9 @@ content: image_style: large image_link: '' weight: '-1' + comment: + label: hidden + type: comment_default + weight: 20 + settings: { } +status: 1 diff --git a/core/profiles/standard/config/entity.display.node.page.default.yml b/core/profiles/standard/config/entity.display.node.page.default.yml new file mode 100644 index 0000000..cf0143d --- /dev/null +++ b/core/profiles/standard/config/entity.display.node.page.default.yml @@ -0,0 +1,12 @@ +id: node.page.default +uuid: 32b98ae0-0839-4907-a642-66cf3ebaefa9 +targetEntityType: node +bundle: page +mode: default +content: + body: + label: hidden + type: text_default + weight: 0 + settings: { } +status: true diff --git a/core/profiles/standard/config/entity.display.node.page.teaser.yml b/core/profiles/standard/config/entity.display.node.page.teaser.yml new file mode 100644 index 0000000..21dda46 --- /dev/null +++ b/core/profiles/standard/config/entity.display.node.page.teaser.yml @@ -0,0 +1,13 @@ +id: node.page.teaser +uuid: 00fd74f8-1923-4c94-9400-d2504ec7f61e +targetEntityType: node +bundle: page +mode: teaser +content: + body: + label: hidden + type: text_summary_or_trimmed + weight: 0 + settings: + trim_length: '600' +status: true diff --git a/core/profiles/standard/config/entity.form_display.comment.node__comment.default.yml b/core/profiles/standard/config/entity.form_display.comment.node__comment.default.yml new file mode 100644 index 0000000..d274beb --- /dev/null +++ b/core/profiles/standard/config/entity.form_display.comment.node__comment.default.yml @@ -0,0 +1,13 @@ +id: comment.node__comment.default +uuid: 7091818e-f287-4cc9-9309-9bc0c1394a7c +targetEntityType: comment +bundle: node__comment +mode: default +content: + comment_body: + type: text_textarea + weight: 0 + settings: + rows: '5' + placeholder: '' +status: true diff --git a/core/profiles/standard/config/entity.form_display.custom_block.basic.default.yml b/core/profiles/standard/config/entity.form_display.custom_block.basic.default.yml new file mode 100644 index 0000000..b22fe9d --- /dev/null +++ b/core/profiles/standard/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 diff --git a/core/profiles/standard/config/entity.form_display.node.article.default.yml b/core/profiles/standard/config/entity.form_display.node.article.default.yml index f3007ac..bda2ccb 100644 --- a/core/profiles/standard/config/entity.form_display.node.article.default.yml +++ b/core/profiles/standard/config/entity.form_display.node.article.default.yml @@ -3,11 +3,10 @@ uuid: 1756324d-52bd-499c-8b06-6d6a87ea71bd targetEntityType: node bundle: article mode: default -status: 1 content: body: type: text_textarea_with_summary - weight: '0' + weight: 1 settings: rows: '9' summary_rows: '3' @@ -25,3 +24,8 @@ content: progress_indicator: throbber preview_image_style: thumbnail weight: '-1' + comment: + type: comment_default + weight: 20 + settings: { } +status: 1 diff --git a/core/profiles/standard/config/entity.form_display.node.page.default.yml b/core/profiles/standard/config/entity.form_display.node.page.default.yml new file mode 100644 index 0000000..abcc567 --- /dev/null +++ b/core/profiles/standard/config/entity.form_display.node.page.default.yml @@ -0,0 +1,14 @@ +id: node.page.default +uuid: d1fac782-fca1-4385-9c00-ddd1b39c7d9f +targetEntityType: node +bundle: page +mode: default +content: + body: + type: text_textarea_with_summary + weight: 0 + settings: + rows: '9' + summary_rows: '3' + placeholder: '' +status: true diff --git a/core/profiles/standard/config/entity.view_mode.comment.full.yml b/core/profiles/standard/config/entity.view_mode.comment.full.yml new file mode 100644 index 0000000..ebeed20 --- /dev/null +++ b/core/profiles/standard/config/entity.view_mode.comment.full.yml @@ -0,0 +1,7 @@ +id: comment.full +uuid: 06ab5b16-e197-4242-b72c-4453793fabba +label: 'Full comment' +targetEntityType: comment +status: false +cache: true +langcode: en diff --git a/core/profiles/standard/config/field.field.comment.comment_body.yml b/core/profiles/standard/config/field.field.comment.comment_body.yml new file mode 100644 index 0000000..b1f3106 --- /dev/null +++ b/core/profiles/standard/config/field.field.comment.comment_body.yml @@ -0,0 +1,14 @@ +id: comment.comment_body +uuid: 0c306a17-e2d1-40ce-a100-b62502e308c2 +status: true +langcode: en +name: comment_body +entity_type: comment +type: text_long +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } diff --git a/core/profiles/standard/config/field.field.custom_block.body.yml b/core/profiles/standard/config/field.field.custom_block.body.yml new file mode 100644 index 0000000..7948e42 --- /dev/null +++ b/core/profiles/standard/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: { } diff --git a/core/profiles/standard/config/field.field.node.body.yml b/core/profiles/standard/config/field.field.node.body.yml new file mode 100644 index 0000000..27b0281 --- /dev/null +++ b/core/profiles/standard/config/field.field.node.body.yml @@ -0,0 +1,14 @@ +id: node.body +uuid: 0ee753bf-a9f0-4a9d-b839-575677f04bd8 +status: true +langcode: en +name: body +entity_type: node +type: text_with_summary +settings: { } +module: text +active: true +locked: false +cardinality: 1 +translatable: false +indexes: { } diff --git a/core/profiles/standard/config/field.field.node.comment.yml b/core/profiles/standard/config/field.field.node.comment.yml new file mode 100644 index 0000000..2202388 --- /dev/null +++ b/core/profiles/standard/config/field.field.node.comment.yml @@ -0,0 +1,14 @@ +id: node.comment +uuid: fdd440fa-e2da-41a3-9551-81a42a346445 +status: true +langcode: en +name: comment +entity_type: node +type: comment +settings: { } +module: comment +active: true +locked: false +cardinality: 1 +translatable: '0' +indexes: { } diff --git a/core/profiles/standard/config/field.instance.comment.node__comment.comment_body.yml b/core/profiles/standard/config/field.instance.comment.node__comment.comment_body.yml new file mode 100644 index 0000000..9e35252 --- /dev/null +++ b/core/profiles/standard/config/field.instance.comment.node__comment.comment_body.yml @@ -0,0 +1,15 @@ +id: comment.node__comment.comment_body +uuid: bd737046-c416-4a8e-a245-690d8fcf635a +status: true +langcode: en +field_uuid: 0c306a17-e2d1-40ce-a100-b62502e308c2 +entity_type: comment +bundle: node__comment +label: Comment +description: '' +required: true +default_value: { } +default_value_function: '' +settings: + text_processing: 1 +field_type: text_long diff --git a/core/profiles/standard/config/field.instance.custom_block.basic.body.yml b/core/profiles/standard/config/field.instance.custom_block.basic.body.yml new file mode 100644 index 0000000..827f22a --- /dev/null +++ b/core/profiles/standard/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 diff --git a/core/profiles/standard/config/field.instance.node.article.body.yml b/core/profiles/standard/config/field.instance.node.article.body.yml new file mode 100644 index 0000000..7e8b6d9 --- /dev/null +++ b/core/profiles/standard/config/field.instance.node.article.body.yml @@ -0,0 +1,16 @@ +id: node.article.body +uuid: 0ab3cfb6-c80e-49bb-8505-0523142888dc +status: true +langcode: en +field_uuid: 0ee753bf-a9f0-4a9d-b839-575677f04bd8 +entity_type: node +bundle: article +label: Body +description: '' +required: false +default_value: { } +default_value_function: '' +settings: + display_summary: true + text_processing: '1' +field_type: text_with_summary diff --git a/core/profiles/standard/config/field.instance.node.article.comment.yml b/core/profiles/standard/config/field.instance.node.article.comment.yml new file mode 100644 index 0000000..6e2f73d --- /dev/null +++ b/core/profiles/standard/config/field.instance.node.article.comment.yml @@ -0,0 +1,27 @@ +id: node.article.comment +uuid: e32ad86a-c280-48d3-803a-58eaa5bb485a +status: true +langcode: en +field_uuid: fdd440fa-e2da-41a3-9551-81a42a346445 +entity_type: node +bundle: article +label: 'Comment settings' +description: '' +required: 1 +default_value: + - + status: 2 + cid: 0 + last_comment_timestamp: 0 + last_comment_name: '' + last_comment_uid: 0 + comment_count: 0 +default_value_function: '' +settings: + default_mode: 1 + per_page: 50 + form_location: 1 + anonymous: 0 + subject: 1 + preview: 1 +field_type: comment diff --git a/core/profiles/standard/config/field.instance.node.page.body.yml b/core/profiles/standard/config/field.instance.node.page.body.yml new file mode 100644 index 0000000..76de339 --- /dev/null +++ b/core/profiles/standard/config/field.instance.node.page.body.yml @@ -0,0 +1,16 @@ +id: node.page.body +uuid: 0448abb7-c51d-435b-8203-034cb003ea2e +status: true +langcode: en +field_uuid: 0ee753bf-a9f0-4a9d-b839-575677f04bd8 +entity_type: node +bundle: page +label: Body +description: '' +required: false +default_value: { } +default_value_function: '' +settings: + display_summary: true + text_processing: '1' +field_type: text_with_summary diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 5aa1dd7..bb8ce1a 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -24,9 +24,6 @@ function standard_install() { // Set front page to "node". \Drupal::config('system.site')->set('page.front', 'node')->save(); - // Add comment field to article node type. - \Drupal::service('comment.manager')->addDefaultField('node', 'article', 'comment', COMMENT_OPEN); - // Allow visitor account creation with administrative approval. $user_settings = \Drupal::config('user.settings'); $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save();