Validation error messages on individual paragraphs do not show when using paragraphs EXPERIMENTAL and the paragraphs with limits are closed

Created on 27 September 2021, about 3 years ago
Updated 6 July 2024, 6 months ago

Steps to reproduce

  1. Create a content type with a paragraphs field reference field that references a paragraph and set a limit of one to it
  2. Set the fields widget display in the content types form display to be "Paragraphs EXPERIMENTAL" instead of paragraphs classic
  3. Create a new node and fill out all required fields and add two paragraphs of the same type (fill out any data)
  4. Click the "Collapse" button to close both paragraph widgets
  5. Try and save node. At this point validation is triggered saying "1 error has been found: [Name of paragraphs reference field]" and upon editing the paragraphs there's no error message displaying which paragraph has the error (something which is shown if you try and save the page without collapsing the paragraph)

Proposed resolution

The proposed solution(s) would be to either update the main system error message to show the names of the components with the errors or ensure an error message is available when a collapsed paragraph is opened.

🐛 Bug report
Status

Postponed: needs info

Component

Code

Created by

🇬🇧United Kingdom lincoln-batsirayi

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium fernly

    This should probably be handled in core at the point where constraints are processed and the error messages are set in the form.

    Though, I made a patch where, for the time being (which could still be a long time), the constraint messages are also set as a message at the top of the page.

    I think this is mostly an issue when editing pages that violate constraints which didn't exist before and are newly added to the field (for example limited paragraphs that weren't limited before).

  • Status changed to Postponed: needs info 6 months ago
  • 🇨🇦Canada pavlosdan

    I can't replicate this with the stable widget on Drupal 10.2.6 and the latest dev version of the module.

    I've added a paragraph field where the paragraphs would be collapsed by default. Added a node with some paragraphs and then went back and added some limits. Trying to resave the same node triggers the correct message to display. Could you please check that this is still an issue?

Production build 0.71.5 2024