Skip to content

[5.x]: With autosaveDrafts disabled, saving entry with validation errors causes issues with Matrix/Neo blocks #15418

@ttempleton

Description

@ttempleton

What happened?

Description

When the autosaveDrafts setting is disabled, when saving an entry that had previously failed to save due to validation errors, some of the non-field data for Matrix/Neo blocks is omitted from the POST data. This causes things like disabled state to be lost, and Neo block levels being lost leading to loss of Neo block structure (related issue: spicywebau/craft-neo#907).

Steps to reproduce

  1. Set autosaveDrafts to false in CMS config
  2. Create a new entry with a Matrix field set to display as blocks
  3. Add a Matrix entry and set it as disabled
  4. Don't put in a required field
  5. Save the owner entry. Craft will give a validation error
  6. Fix that validation error and save it again
  7. After saving the owner entry, the Matrix entry is enabled

Expected behavior

Matrix entry stays disabled after saving owner entry

Actual behavior

Matrix entry is enabled after saving owner entry

Craft CMS version

5.2.8

PHP version

8.2.20

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

  • Neo 5.1.0

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