The position of the item that fails validation is not correct when the item has been moved

Created on 26 August 2024, 9 months ago

Problem/Motivation

The new error message that has been introduced in Show the paragraph and field label of fields that fail validation Fixed is displaying the position of the original delta. This is working perfect in case the position of the failed item is not changed.
However, if the position of the failed item has changed, the displayed position is not correct...

Steps to reproduce

- Having a paragraph type with at least one non mandatory field...
- Create new paragraphs (of different types) in a node.
- Now, in the paragraph type, make any of its fields mandatory.
- Try to resave the node, you see the new error message of the failed item with the correct (original) position.
- Move the failed item to new position, and resave the node, you still see the original position!

Proposed resolution

Introduce and set '_new_delta' to the item in massageFormValues
Then use '_new_delta' in massageCollapsedParagraphsErrorMessages for the position...

🐛 Bug report
Status

Active

Version

1.18

Component

Code

Created by

🇧🇪Belgium msnassar

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

Comments & Activities

Production build 0.71.5 2024