Skip to content

Bug: Nested object values in blocks can reset on subsequent saves #648

@bobbwal

Description

@bobbwal

Summary

Nested object field values inside block data can be lost or reset after a subsequent save, even when the second edit is
unrelated.

Current behavior

In block-based content (for example, a Hero block with CTA objects), values inside nested objects may save correctly the
first time, but then reset on a later save.
Example: CTA button style set to secondary reverts to primary after editing another field and saving again.

Expected behavior

Nested object values should persist unchanged across repeated edits/saves unless explicitly modified.

Affected area

  • Admin content form serialization for structured/nested object and array fields within blocks.

Repro steps

  1. Create or edit content using a blocks field (e.g. Hero block).
  2. Set nested object values (e.g. CTA style = secondary, CTA link settings).
  3. Save.
  4. Reopen content, change an unrelated field (e.g. title), save again.
  5. Observe nested object values may reset.

Notes

  • This appears in serialization/readback logic for structured fields in the admin form, not in frontend rendering.
  • Observed with nested CTA object fields in Hero blocks, but potentially relevant to other nested structured shapes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions