Skip to content

[6.x] Fix save crash after deleting a Bard set containing a hidden field#15008

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
werner-freytag:fix/issue-15007
Jul 14, 2026
Merged

[6.x] Fix save crash after deleting a Bard set containing a hidden field#15008
jasonvarga merged 1 commit into
statamic:6.xfrom
werner-freytag:fix/issue-15007

Conversation

@werner-freytag

Copy link
Copy Markdown
Contributor

Fixes #15007.

Deleting a Bard set leaves a null node in the in-memory value, which makes forgetValue()data_delete() throw a TypeError on save. See the issue for the full root-cause analysis and reproduction.

Fix (resources/js/components/publish/Values.js)

  • missingValue(): treat a null intermediate as missing, so forgetValue() correctly bails out.
  • data_delete(): guard against non-object intermediates (and the final delete) as a safety net for all callers.

Test added in resources/js/tests/PublishValues.test.js.

@werner-freytag werner-freytag changed the title fix save crash after deleting a Bard set containing a hidden field [6.x] fix save crash after deleting a Bard set containing a hidden field Jul 14, 2026
@jasonvarga jasonvarga changed the title [6.x] fix save crash after deleting a Bard set containing a hidden field [6.x] Fix save crash after deleting a Bard set containing a hidden field Jul 14, 2026
@jasonvarga jasonvarga merged commit aa60563 into statamic:6.x Jul 14, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting a Bard set leaves a null node → save crashes in Values.data_delete (TypeError)

2 participants