Skip to content

[5.x]: Required Field Setting Not Persisting in Entry Type and Missing Visual Indicator #16380

@AlexShearcroft

Description

@AlexShearcroft

What happened?

Description

We are encountering an issue where marking a field as "required" within an Entry Type does not persist after saving. Additionally, the red asterisk indicating a required field does not appear as expected.

Steps to reproduce

  1. Navigate to an Entry Type.
  2. Edit an existing field in the field layout and select "Make required."
  3. Observe that the button changes to "Make optional," but the red asterisk (*) indicating a required field does not appear.
  4. Save the Entry Type.
  5. Reopen the same Entry Type and check the field.

Expected behavior

When selecting "Make required," the field should immediately display the red asterisk to indicate it is required. Upon saving, the required status should persist, and the field should remain required when the Entry Type is reopened.

Actual behavior

The field is not marked as required, and the red asterisk is missing, despite having selected "Make required" before saving.

When attempting to mark a field as "required," the following error appears in the console log:

POST https://mysite.ddev.site/index.php?p=admin%2Factions%2Ffields%2Fapply-layout-element-settings&v=1735896571461 400 (Bad Request)

Uncaught (in promise) TypeError: Cannot read properties of null (reading '$container')
    at FieldLayoutDesigner.js:1209:40
    at Array.forEach (<anonymous>)
    at FieldLayoutDesigner.js:1208:32
    at h (FieldLayoutDesigner.js:2:1)
    at Generator.<anonymous> (FieldLayoutDesigner.js:2:1)
    at Generator.throw (FieldLayoutDesigner.js:2:1)
    at asyncGeneratorStep (FieldLayoutDesigner.js:2:1)
    at o (FieldLayoutDesigner.js:2:1)

Craft CMS version

5.5.8

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions