Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displays validation error messages on control panel forms #5950

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wesleybl
Copy link
Member

@wesleybl wesleybl commented Apr 5, 2024

Fixes: #5274

Now the error is displayed:

download (13)

To works properly, it needs: plone/plone.restapi#1771

But it can be merged separately without any problems.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit 63a7238
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/663155ebd8ef6100082af817

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 63a7238
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/663155eb9b050c0008f3b166

Copy link
Sponsor Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you resolve the merge conflict?

invariantErrors = errorsList
.filter((errorItem) => !('field' in errorItem))
.map((errorItem) => errorItem['message']);
}
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to move some of this to a helper function that can be used here and in other components instead of duplicating the logic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@wesleybl
Copy link
Member Author

@ichim-david I ran into the error in the "As editor, I can unlock a locked page" test again. I remember you found a solution to the problem:

#5933 (comment)

Do you intend to make this fixe?

@wesleybl
Copy link
Member Author

Could you resolve the merge conflict?

@davisagli done.

@wesleybl wesleybl requested a review from davisagli April 30, 2024 20:51
@ichim-david
Copy link
Sponsor Member

@ichim-david I ran into the error in the "As editor, I can unlock a locked page" test again. I remember you found a solution to the problem:

#5933 (comment)

Do you intend to make this fixe?

@wesleybl yup I do ... time to dust up the old pull request I didn't add, April was not a good month for Volto work unlike March :)

@ichim-david
Copy link
Sponsor Member

@ichim-david I ran into the error in the "As editor, I can unlock a locked page" test again. I remember you found a solution to the problem:

#5933 (comment)

Do you intend to make this fixe?

@wesleybl only left it there for 1 month .. if you would like to test it locally the locking test here is the pull request where I made the changes necessary to avoid errors after running it 20 times in a row as I've given you the comment on how todo it
#5998

@wesleybl
Copy link
Member Author

@davisagli @sneridagh can you take a look please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation error messages are not shown in the controlpanel
4 participants