payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
25.2k stars 1.61k forks source link

Error block indication is not clear #7911

Open ChannKan opened 2 months ago

ChannKan commented 2 months ago

Link to reproduction

https://github.com/shefing/PayloadSplitBug

Environment Info

New instance of payload website template

Describe the Bug

When I have a content page that contains many blocks one after the next , and I have an issue with one of the blocks (For example : a required field is empty ), I get a pop-up error message box that I have an error in the block before the block with the issue. (For example : block number 3 has a non-filed required field , the message wile be - block.2.XXX .....)

Attached a screenshot with the issue (Issue is in the second block but the pop-up points on block 1) .

Screenshot 2024-08-28 at 11 46 02

Reproduction Steps

Step for reproduction:

  1. Clone the reproduction repo or create a new payload website template

  2. Create a new Page instance

  3. In the Hero tab:

    • Fill in the title
    • Add a Link block and fill it up
    • Add a second Link block and fill it up except the Label field
  4. Try to publish the page

Expected : An error message "hero.links.2.link.label"

Actual: An error message "hero.links.1.link.label"

Adapters and Plugins

No response

denolfe commented 2 months ago

Closing in favor of #7914.

github-actions[bot] commented 2 months ago

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

GermanJablo commented 1 month ago

The user has reported in Discord that this issue still exists. I haven't reproduced it, but it seems different than #7914