From dd2982b5324445ec4e1d49b2cbcfa0ab19a607ae Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 22 Nov 2024 19:08:13 +0000 Subject: [PATCH] =?UTF-8?q?Issue=20#3488742=20by=20catch,=20phenaproxima,?= =?UTF-8?q?=20g=C3=A1bor=20hojtsy:=20Stop=20calling=20node=5Fadd=5Fbody=5F?= =?UTF-8?q?field()=20from=20NodeTypeForm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tests/src/Nightwatch/Tests/ckEditor5CodeSyntaxTest.js | 3 ++- .../tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js | 5 +++-- core/modules/node/src/NodeTypeForm.php | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5CodeSyntaxTest.js b/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5CodeSyntaxTest.js index 120419b02e5..2bf3247862c 100644 --- a/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5CodeSyntaxTest.js +++ b/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5CodeSyntaxTest.js @@ -3,7 +3,7 @@ module.exports = { '@tags': ['core', 'ckeditor5'], before(browser) { - browser.drupalInstall({ installProfile: 'minimal' }); + browser.drupalInstall({ installProfile: 'testing' }); }, after(browser) { browser.drupalUninstall(); @@ -14,6 +14,7 @@ module.exports = { // Enable required modules. .drupalRelativeURL('/admin/modules') .click('[name="modules[ckeditor5][enable]"]') + .click('[name="modules[node][enable]"]') .click('[name="modules[field_ui][enable]"]') .submitForm('input[type="submit"]') // Submit module form. .waitForElementVisible( diff --git a/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js b/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js index 07afeaad777..d5285eb6abc 100644 --- a/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js +++ b/core/modules/ckeditor5/tests/src/Nightwatch/Tests/ckEditor5EditorHeightTest.js @@ -4,9 +4,10 @@ module.exports = { '@tags': ['core', 'ckeditor5'], before(browser) { browser - .drupalInstall({ installProfile: 'minimal' }) + .drupalInstall({ installProfile: 'testing' }) .drupalInstallModule('ckeditor5', true) - .drupalInstallModule('field_ui'); + .drupalInstallModule('field_ui') + .drupalInstallModule('node', true); // Set fixed (desktop-ish) size to ensure a maximum viewport. browser.resizeWindow(1920, 1080); diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php index 445f567c900..3328ade970d 100644 --- a/core/modules/node/src/NodeTypeForm.php +++ b/core/modules/node/src/NodeTypeForm.php @@ -235,7 +235,9 @@ class NodeTypeForm extends BundleEntityFormBase { $this->messenger()->addStatus($this->t('The content type %name has been updated.', $t_args)); } elseif ($status == SAVED_NEW) { - node_add_body_field($type); + if (\Drupal::installProfile() === 'testing') { + node_add_body_field($type); + } $this->messenger()->addStatus($this->t('The content type %name has been added.', $t_args)); $context = array_merge($t_args, ['link' => $type->toLink($this->t('View'), 'collection')->toString()]); $this->logger('node')->notice('Added content type %name.', $context);