Closed (fixed)
Project:
Drupal core
Version:
main
Component:
text.module
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2024 at 13:50 UTC
Updated:
17 Sep 2026 at 13:00 UTC
Jump to comment: Most recent
Conversation started in #2726497: Deprecate text_with_summary
This appears to already have the support of framework and product managers but need to plan out how to best go about it.
Currently the body field is a special field with a storage to use text_with_summary. Do we update that?
NA
Full deprecate the plugin for removal in D13
See the child issues :)
NA
No longer offer text_with_summary option
NA
TBD
Comments
Comment #2
smustgrave commentedComment #3
catchThe current logic was added in #553306: Make nodes have no body field by default. Remove deprecated APIs for body field as part of the field API conversion in Drupal 7. I personally think we could retire the auto-creation of the body field, and add a message to encourage people to create some fields after adding a new node type instead, but that's a fairly significant UX change so tagging for product manager review.
If we want to keep node_add_body_field() then to deprecate text_with_summary we'd need to change the field type it creates for new sites.
In both cases, we need to allow the field storage for 'body' to be deleted, so that sites with no instances are able to remove it and not rely on the eventual text_with_summary contrib module.
Comment #4
smustgrave commentedI imagine if we keep the body field and change it to create a text long storage we will have to update umami and standard at the same time.
Comment #5
catch@smustgrave yes although there might not be much to update in that case?
Comment #6
smustgrave commentedIt definitely would be far less. Think for umami it would of been a fraction of the file changes needed
Comment #7
catchDiscussed this with @lauriii and @gaborhojtsy in slack. Both are in favour of removing the automatic creation of the body field for content types in general. That will need its own issue too (hopefully not too massive at least outside tests), but will also mean that the Umami changes made already are likely what will be needed, since the 'body' field won't be repurposed in general but just go away. Leaving the tag for now in case they want to add anything.
Comment #8
smustgrave commentedSlightly sad to see the auto creation go away but fully get it. I usually end up deleting it for new content types anyway. I do wonder about the contrib impact though.
I'm scared to look
Will let @laurii or @gaborhotjsy chime in, once they do I suppose we can un-postpone the Umami ticket.
Open a ticket for updating Standard to use field_body instead
Open a ticket to drop the auto storage creation of body (sure this will be a large ticket).
Open a ticket for creation of a new module (text_with_summary) and move the formatters to that.
Sound like a good order?
Anything with migration that needs it's own ticket?
Comment #9
catchThat all sounds good, I think we'll find out about migration when we get there!
Comment #10
simeComment #11
simeIn slack we discussed how the automatic body functoinality needs to be removed in starshot, that's #3447617: Stop automatic storage creation of body field for node. I think this boat is ready to push off gently.
Remaining tasks
Agree on what to do with 'body' special field, if it should be updated to use text_long storage or new one created.Comment #12
cainaruAdding the “Needs documentation updates” tag per Slack discussion with @lawrolan
Comment #13
smustgrave commented#2 for Umami is up for review, that one was easy
But while working on the Standard profile removal ticket discovered a TON of migration failures are now happening. And after speaking with @larowlan seems that we will need to
1. Remove auto creation
2.a Create the deprecated module that will house the special "body" storage in node/block_content, text_with_summary plugins, and migration
2.b Probably need an upgrade path
3 Then should be good to remove from Standard.
Thoughts?
Edit
Comment #14
smustgrave commentedwanted to bring this up again which would be the next ticket that needs to fall?
#3447617: Stop automatic storage creation of body field for node or #3477043: Change automatic body field creation to use formatted text field instead of text_with_summary
Comment #15
catch#3447617: Stop automatic storage creation of body field for node landed already.
The most active issue at the moment is #3489266: Deprecate node_add_body_field(). I think it would probably make sense to get that one done first (haven't reviewed it yet though), and then see what's left for #3447617: Stop automatic storage creation of body field for node.
If we do those, we shouldn't need #3477043: Change automatic body field creation to use formatted text field instead of text_with_summary.
Comment #16
smustgrave commentedSo working on #3447617: Stop automatic storage creation of body field for node but imagine we will still need to do #3477043: Change automatic body field creation to use formatted text field instead of text_with_summary after so we can then deprecate the plugin right?
Comment #17
smustgrave commentedI'll admit though no idea how to change the storage type without breaking all the migration fixtures.
Comment #18
berdirmigrate fixtures are about setting up the *old* site. That doesn't change, D6/D7 will always use text_with_summary, unless we invent time travel. So we don't have to.
what we would need to change is to what we migrate it *to*, we'd need to split it up into separate fields, summary into a field and main body into another. Including the special marker in content and split off from there. But since migrate_drupal is also being deprecated, we can just let contrib deal with that. That can continue to depend on a text_with_summary contrib module or it can attempt to do this.
We can't do both #3477043: Change automatic body field creation to use formatted text field instead of text_with_summary and #3447617: Stop automatic storage creation of body field for node, they're mutually exclusive. BUT, what we need is an issue for standard profile to create a separate teaser and body field instead, same for the recipes, umami and so on.
Comment #19
catchGiven #3315257: [meta] Tasks to deprecate Migrate Drupal I think it would be fine if we continue to migrate into the deprecated field, then the field itself could only be removed in Drupal 13 at this point, and migrate_drupal will already have been removed in Drupal 12 at that point.
Comment #20
smustgrave commentedSo once #3447617: Stop automatic storage creation of body field for node lands I'm thinking next steps would be to
1. Convert the storage.body fields we just moved to be text_long vs text_with_summary. Probably can do this in one ticket but can see the argument to breakup. But 0 idea how to address migration
2. Opened #3539390: Change createBodyField from making text_with_summary.
3. Then would imagine we are good to move the text_with_summary plugin to it's own module to be deprecated.
Thoughts?
Comment #21
smustgrave commentedComment #22
smustgrave commentedComment #23
smustgrave commentedGot 3 issues up for review lets land those then figure out next steps
Comment #24
smustgrave commentedJust thinking next after these 3
1. Convert all profiles and recipes to not use text with summary
2. Can we start the new module that will hold the plugin but not deprecate it yet? So we can move any migrations and tokens to it? Or does the module need to be added deprecated?
Comment #25
mstrelan commentedI would think it cannot be deprecated until there is a replacement, and that replacement would be the contrib module. The contrib module would not exist until the core module exists.
Comment #26
smustgrave commentedMakes sense and actually means probably can start it soon once we do a few more steps!
Comment #27
berdirIt's not just changing the type. We do want a comparable feature of having teasers I think, even on standard. Also as an example on how you'd do that. Not sure if umami has something like that too. That means we need a separate new field_teaser_text or something like that, set up form and view displays, update tests. Should that be a plaintext field or one with a format? Not sure. In our distribution, we plan for customization and make it a text with format, but by default limit it to plaintext. That feature is in core now.
Comment #28
catchUmami completely avoids this by using field_body fields (not body), a separate summary field for recipes, and card layouts instead of teasers. text_with_summary isn't used at all.
For the standard profile, I think we should be removing the content types (because Drupal CMS has content types), although this needs product manager review. #3159848: [Policy] Always install Drupal with Standard on the UI, pared down of use case specific elements (content types, node listing, commenting, theme) is the closest issue I could find this morning.
There's already an issue to remove text_with_summary from the page content type though at #626546: The body field on the Basic Page content type should not allow a summary to be input.
Comment #29
berdirsounds like umami already does exactly what I'm proposing for standard, so that shouldn't need changes at all, makes sense. we also didn't have to change it in the field storage issue I think.
Yes, I would assume that standard would only add such a teaser field to articles and not page, solving the page node type summary issue you referenced.
Removing those node types completely does sound like a sensible direction considering we have Umami and Drupal CMS, but also sounds like a more complicated change than adding a teaser field. you can still somewhat use standard as an evaluation of the basic capabilities of Drupal. Removing Page and Article would definitely add many non-trivial steps to that. So I'm certain that's going to result in some concerns.
Comment #30
catchI think a separate summary field for standard is fine, it's just that if/when we remove the content types it will be gone again, but yes that might be an easier/quicker change to make to unblock further progress here.
Comment #31
smustgrave commentedThat’ll be my next step.
Do we think we are at a point we should start the text_with_summary module and move the plugin to that? We can make text depend on it for now
Comment #32
smustgrave commentedWoo thank you @catch for merging #3447617: Stop automatic storage creation of body field for node
So believe next steps are
1. #3539390: Change createBodyField from making text_with_summary
2. Replace text_with_summary in profiles/recipes
3. Same as we did for node do the same for block_content.
Then after that we may be good to move the plugin into it's own module.
Comment #33
smustgrave commentedOkay new order of priority
1. #3548762: Stop automatic storage creation of body field for block_content
2. #3548756: Change profiles/recipes to not use text_with_summary blocked by above
3. #3539390: Change createBodyField from making text_with_summary this one I have to think about because the token tests are failing because a non summary field is now being created. Maybe we comment out those with a todo to move to the new text_with_summary module whens that's created.
So either after #3 or before it I think we should be good to create text_with_summary and start to move the plugin and tests. T
Thoughts?
Comment #34
xmacinfoWill the new contrib use this namespace?
https://www.drupal.org/project/text_with_summary
Comment #35
smustgrave commentedComment #37
smustgrave commentedGot the product sign off in #3619747: [policy, no patch] Deprecate text_with_summary plugin and move to contrib and it's officially deprecated!
Subtree split is done and contrib space is up https://git.drupalcode.org/project/text_with_summary and issues moved over. Now just need to remove the module from main
Comment #38
smustgrave commentedPlugin as been deprecated and removed think we are all good here!