Problem/Motivation
Drupal 11.5 deprecated the text_with_summary field type and moved it to a deprecated core module, which is removed from Drupal 12 (change record). It continues as the contrib project Text with Summary.
The product body field uses text_with_summary, so on Drupal 12 every test installing commerce_product fails with "The text_with_summary plugin does not exist". The summary is not even used: the field has display_summary: false.
Core made the same move: body fields created by core (block content, BodyFieldCreationTrait) use text_long.
Proposed resolution
- New installs: switch the product body field storage/config to
text_long, with thetext_textareawidget. commerce_product_add_body_field(): reuse the type of the existingbodyfield storage when there is one, so new product types on existing sites keep working; only usetext_longwhen the storage is created.
Existing sites: no Commerce update needed. Drupal core 11.5 already installs the text_with_summary module when such fields exist. Before upgrading to Drupal 12, sites need the contrib module (composer require drupal/text_with_summary), just like for their node body fields. This goes in the 4.0.0 release notes.
Remaining tasks
- Update config and
commerce_product_add_body_field(). - Add a release note.
User interface changes
None (the summary was already hidden).
API changes
None.
Data model changes
New installs get a text_long product body field instead of text_with_summary. Existing fields are unchanged.
Issue fork commerce-3638856
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
Comment #4
jsacksick commented