Skip to content

[5.x] Use deep copy of set's data in bard field#11766

Merged
jasonvarga merged 1 commit intostatamic:5.xfrom
faltjo:fix-bard-set-replicator-bug
May 7, 2025
Merged

[5.x] Use deep copy of set's data in bard field#11766
jasonvarga merged 1 commit intostatamic:5.xfrom
faltjo:fix-bard-set-replicator-bug

Conversation

@faltjo
Copy link
Copy Markdown
Contributor

@faltjo faltjo commented May 6, 2025

This PR fixes #11765

Instead of a shallow copy, a deep copy of the (default) values is used when adding or duplicating set defined for a bard field.

When using statamic from this branch, the problems are gone in the example repo: https://github.com/faltjo/fix-bard-field-set-bug

Note that this is very similar to #11621

@duncanmcclean duncanmcclean changed the title [5.x] use deep copy of set's data in bard field [5.x] Use deep copy of set's data in bard field May 6, 2025
@faltjo faltjo force-pushed the fix-bard-set-replicator-bug branch from e1a6a01 to ffd1f32 Compare May 6, 2025 09:37
@jasonvarga jasonvarga merged commit eec1de9 into statamic:5.x May 7, 2025
50 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.

Bard field's set replication uses same object for multiple sets

2 participants