Overview

When a Formatted Text Field marked as required in a code component is cleared after being added to the canvas, it results in an error:

"An unexpected error has occurred while rendering the component's form."

This issue disrupts the component's rendering and prevents further editing of the field, causing unexpected behavior in the form.

Steps to Reproduce:

  1. Edit an Article
  2. Add a code component to the library with a required props Formatted Text Field.
  3. Drag and drop the added code component to the canvas
  4. In the component form, remove all text from the Required Formatted Text Field.
  5. Observe the error message: "An unexpected error has occurred while rendering the component's form."
{
    "message": "Required prop \"required\" is missing from the client model."
}

Proposed resolution

User interface changes

Comments

mayur-sose created an issue. See original summary.

libbna’s picture

StatusFileSize
new48.99 KB

I followed the testing steps outlined in the issue summary but did not encounter any errors in the console or elsewhere.

When I clear the text from the input field and attempt to publish the changes, a validation error is displayed: "The property name is required." — which is the expected behaviour.

Additionally, after switching to Page Data and then back to Settings, the field retains its default text value.

mayur-sose’s picture

Status: Active » Closed (cannot reproduce)

This issue is not reproducible. I have verified that the right-hand panel does not crash even when a required prop is left empty. Attempting to publish with an empty required prop correctly displays an error message in the publish panel: “The property test is required.” This is the expected behavior.