Skip to content

[6.x] Fix replicator preview text merging during reorder#14072

Open
dannyuk1982 wants to merge 1 commit intostatamic:6.xfrom
dannyuk1982:fix/replicator-preview-merge-on-reorder
Open

[6.x] Fix replicator preview text merging during reorder#14072
dannyuk1982 wants to merge 1 commit intostatamic:6.xfrom
dannyuk1982:fix/replicator-preview-merge-on-reorder

Conversation

@dannyuk1982
Copy link

Summary

  • Fixes collapsed replicator preview text incorrectly merging fields from different set types after drag-and-drop reorder
  • When a field handle from a stale preview entry doesn't exist in the current set's config, previewText now returns false (filters it out) instead of falling through to the default showFieldPreviews behavior
  • Applied the same fix in both Set.vue (replicator) and ManagesPreviewText.js (shared by Bard sets & Group fieldtype)

Fixes #14071

Test plan

  • Create a replicator field with 2+ set types having different fields
  • Add content to sets of different types
  • Collapse the sets to see preview text
  • Drag-and-drop to reorder sets of different types
  • Confirm preview text shows only the correct set's fields (no merging)
  • Refresh page and confirm previews still correct

🤖 Generated with Claude Code

…uring reorder

When drag-and-drop reordering replicator sets of different types, the
collapsed preview text incorrectly merged fields from multiple set types.
This happened because stale preview entries from the old set type remained
at index-based paths, and the previewText filter failed to exclude fields
that don't belong to the current set type — when a field handle wasn't
found in the set's config, it fell back to {} and {}.replicator_preview
=== undefined evaluated to true, letting foreign fields pass through.

Now when a field handle is not found in the current set's config, it
returns false immediately, filtering out any stale foreign-type fields.

Fixes statamic#14071

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dannyuk1982 dannyuk1982 changed the title Fix replicator preview text merging during reorder [6.x] Fix replicator preview text merging during reorder Feb 25, 2026
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.

When reordering replicators preview text merges all fields

1 participant