Not filling out required portlet third party configuration form elements leads to invisible form error, when moving portlets on the homebox personalization page

Created on 3 April 2024, 3 months ago
Updated 9 April 2024, 3 months ago

Alternative title: "Third party configuration form errors are not shown - but prevent correct handling"

Problem/Motivation

Not filling out required portlet third party configuration form elements leads to invisible form error, when moving portlets on the homebox personalization page.
In our "homebox_portlet_type_examples" module, we provide 3 portlet plugins. One of them is "homebox_portlet_type_examples_simple_form" (SimpleForm) plugin, which defines the required form element "example_form_value" inside buildThirdPartyConfigurationForm().
Adding this portlet to the personalization form is no problem at all. BUT, we can not move the portlet. At first, it seems that, we can, as the UI makes it look, like it moved. But after we reload the page, the portlet is back to its original position:
https://sharing.clickup.com/clip/p/t4723376/e4d7bfd9-d556-49e2-adbb-c9b5...

This is due to an invisible form state error, that wants the user to fill out the "example_form_value". Which is only seen, when debugging the submitForm through xdebug and even there we can only see, that there are errors through "$form_state->hasAnyErrors()", "$form_state->getErrors()" won't show the actual error (Atleast using xdebug through the php debug extension in VSCODE) . NOT EVEN AN AJAX ERROR IS THROWN ON THE CONSOLE!!

Steps to reproduce

See clickup clip attached.

Proposed resolution

Display the invisible form error.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Grevil

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024