Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294298

After enabling Require Summary on a field can't save the field

$
0
0

Problem/Motivation

After enabling Require summary on a Text (formatted, long, with summary) field, when editing the field can't save without giving a default Summary.

Also I can check Require summary without summary input being checked.

Steps to reproduce

  • Navigate to /admin/structure/block/block-content/manage/basic/fields/block_content.basic.body
  • Enable Require summary (but not Summary input)
  • Save (Message: Saved Body configuration)
  • Navigate to /admin/structure/block/block-content
  • Add custom block
  • Note: only Block description and Body field are visible, no summary
  • Add description
  • Add body
  • Error: Summary field is required.. Note: This behavior is different in Drupal 9.5. There is no longer an error on save. See comment #59.
  • Back to /admin/structure/block/block-content/manage/basic/fields/block_content.basic.body
  • Note: summary is not visible
  • Disable Require summary
  • Error: Summary field is required.. Note: This behavior is different in Drupal 9.5. There is no longer an error on save. See comment #59.

Screenshots

Before:

before1

before2

After:

after1

after2

Proposed resolution

Update the form validation to require that Summary input must be enabled before Require summary can be enabled.

Also even when Require Summary is checked, builders can still save the field UI without putting a default summary in.

Remaining tasks

  1. Create patch
  2. Review patch
  3. Answer outstanding questions
  4. Test patch- Use test-only feature
  5. Commit

Outstanding questions

Outstanding questions (see comments in #38, #53, and #59 for reference).
When editing the text field on an entity:

  1. When the Summary input is enabled/checked, should the Summary field under Default value automatically display? Or should it only display after the field has been saved? How is this handled in other places? - not sure but also seems like a follow up as this is about fixing a bug (least how I understand it) - Opened #3394040: When the Summary input is enabled/checked, should the Summary field under Default value automatically display
  2. When the Summary input is disabled/unchecked, what should happen to any existing values in the Summary field? - Seems like a follow up but this issue shouldn't tough that. - Opened #3394041: When the Summary input is disabled/unchecked, what should happen to any existing values in the Summary field?
  3. When Summary input is disabled/unchecked should Require summary be automatically unchecked? - Yes updating fix

User interface changes

See screenshots

API changes

NA

Data model changes

NA

Release notes snippet

NA


Viewing all articles
Browse latest Browse all 294298

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>