-
-
Notifications
You must be signed in to change notification settings - Fork 785
display field form errors in ObjectBrowserWidget. #6787
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
Comments
hi @alexandreIFB can i work on this issue the solution is i have changed line 358 |
@alexandreIFB does any core block have this problem? If not, could you suggest a change in the code to simulate the problem? |
To simulate the issue and verify the fix: Edit the schema of the Teaser block (e.g., line 109) and mark the title field as required. Attempt to save the block without providing a title. |
@alexandreIFB could you please put this in the issue description? |
@alexandreIFB the volto/packages/volto/src/components/manage/Blocks/Teaser/schema.js Lines 87 to 89 in 3c93951
I think the |
You are right, I ended up confusing it with another problem, updating the problem description with more information |
Describe the bug
When using the ObjectBrowserWidget, external errors (e.g. required field) do not display visual alerts in the form field. This prevents the manager from clearly identifying the issues.
Example in Teaser:

Current behavior:
Expected behavior:

Simulate
To simulate the issue and verify the fix:
Save Teaser without providing Target ( href).
Additional context
The problem is related to the validateManualLink and onSubmitManualLink methods, where internal errors are not being merged with external errors.
volto/packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.jsx
Lines 238 to 242 in 91b2258
volto/packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.jsx
Line 358 in 91b2258
A possible solution is to combine this.state.errors with this.props.error in the render method before passing them to the FormFieldWrapper.
The text was updated successfully, but these errors were encountered: