2.1 update makes the Summary field unconditionally required due to a removed condition

Created on 12 August 2024, 3 months ago
Updated 27 August 2024, 3 months ago

Problem/Motivation

Upgrading from 2.0 to 2.1 causes the Summary field to be required unconditionally.

Steps to reproduce

Drupal 10.3
Upgrade to 2.1
Edit a piece of content with a text with summary field
Click the "Edit Summary" link
Summary is expanded and is required, regardless of the field's summary required settings
This is caused by the condition having been removed in text_summary_options.module
Not sure why it was decided to unconditionally mark the field as required, but doesn't seem to make sense
The original code was conditional on Drupal version 8.8, so maybe I'm missing something in the thread

Proposed resolution

Add back the condition, if ($required_summary_setting) before doing $element['summary']['#required'] = TRUE;

Remaining tasks

Check the required status instead of setting it to TRUE unconditionally. Again, not sure if the Drupal version affects how this is checked.

πŸ› Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada darkodev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024