Problem/Motivation

As part of being able to deprecate and eventually remove text_with_summary, we need to stop calling node_add_body_field() in a number of places. One of the best places to start would be NodeTypeForm.

Proposed resolution

Remove all calls to node_add_body_field() from NodeTypeForm

User interface changes

When a user creates a content type in the UI, that content type will no longer have a body field automatically attached to it.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

Issue fork drupal-3488742

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smustgrave created an issue. See original summary.

phenaproxima’s picture

Title: Remove node_add_body_field from NodeTypeForm » Stop calling node_add_body_field() from NodeTypeForm
Issue summary: View changes
phenaproxima’s picture

Assigned: Unassigned » phenaproxima

Alright, started an MR. Let's see what breaks.

catch’s picture

Status: Active » Needs review

Discussed this briefly with @Gábor Hojtsy in slack and he approved this change from a product manager perspective. It changes what happens with the form, but since the field is already deletable it doesn't affect other expectations outside the UI.

phenaproxima’s picture

Issue summary: View changes
Status: Needs review » Active
phenaproxima’s picture

Assigned: phenaproxima » Unassigned
Status: Active » Needs work

OK, so all PHP tests are now passing but Nightwatch tests are failing because they need to manually add the body field after creating a new content type. I have no Nightwatch experience.

catch’s picture

Tried clicking the button in a different way etc. but did not really get anywhere.

gábor hojtsy’s picture

I think this makes sense, it fits into the philosophy we are taking Drupal core towards, being more of an enabler that other layers can rely on, not trying to be a complete solution.

alexpott’s picture

Issue tags: +Needs change record

Can we get a follow-up to fix the nightwatch tests. I will do that but after we land this.

We also need a change record so we can highlight the behaviour change in the 11.1 release. Drupal has added a body field for you for a very long time.

phenaproxima’s picture

Status: Needs work » Reviewed & tested by the community

Well that certainly is a workaround. :) I feel okay RTBCing this because it's different than the approach I took. Effectively a different patch.

This is important for the future of Drupal CMS so, knowing that we have follow-up issues in place to address this properly and to deprecate/remove this accursed function, and that if we don't do this now, we won't get another chance until 11.2...

...let it fly.

catch’s picture

Here's the follow-up #3489266: Deprecate node_add_body_field().

I can draft the CR now too.

alexpott’s picture

Adding issue credit.

alexpott’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs change record

Committed and pushed dd2982b5324 to 11.x and c4e3cfcfe05 to 11.1.x. Thanks!

  • alexpott committed c4e3cfcf on 11.1.x
    Issue #3488742 by catch, phenaproxima, gábor hojtsy: Stop calling...

  • alexpott committed dd2982b5 on 11.x
    Issue #3488742 by catch, phenaproxima, gábor hojtsy: Stop calling...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

acbramley’s picture