Fix duplicating a Pod collapsing down to only 5 fields - #7597
Open
faisalahammad wants to merge 2 commits into
Open
Fix duplicating a Pod collapsing down to only 5 fields#7597faisalahammad wants to merge 2 commits into
faisalahammad wants to merge 2 commits into
Conversation
faisalahammad
requested review from
JoryHogeveen and
sc0ttkclark
as code owners
August 9, 2026 18:59
When duplicating an ACT pod (Content Type "Pod"), the duplicate routine creates a fresh skeleton pod first. For the "pod" type, saving that skeleton auto-creates a default "Details" group holding 5 fields (name, created, modified, author, permalink). The loop that recreates the original groups then collides with that auto-created group, and the error is silently caught, so the original custom fields never get copied. Add an internal bypass_default_groups flag that only the duplicate routine sets, telling save_pod to skip auto-creating the default group so the loop recreates the original groups fully. The flag is unset before the pod options are merged, so it never leaks into the duplicated pod's stored options. Normal pod creation is unchanged. Fixes pods-framework#7390
faisalahammad
force-pushed
the
fix/7390-duplicate-pod-fields
branch
from
August 9, 2026 19:01
ae0aa7c to
12848da
Compare
Contributor
Author
|
AI disclosure: this PR was written with Claude Opus 5 assistance, reviewed and tested by me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When duplicating an ACT pod (Content Type "Pod") with many fields, the duplicated pod only kept the 5 auto-generated default fields (name, created, modified, author, permalink) and silently dropped all custom fields.
The duplicate routine creates a fresh skeleton pod first. For the "pod" type, saving that skeleton auto-creates a default "Details" group holding the 5 default fields. The loop that recreates the original groups then collides with that auto-created group, the error is silently caught, and the original custom fields never get copied.
This adds an internal
bypass_default_groupsflag that only the duplicate routine sets. It tellssave_podto skip auto-creating the default group so the loop below recreates the original groups fully. The flag is unset before the pod options are merged, so it never leaks into the duplicated pod's stored options. Normal pod creation is unchanged.Related GitHub issue(s)
Fixes #7390
Testing instructions
detailsand 10 custom fields.created,modified,author,permalinkfields (14 total).Detailsgroup / default fields (no regression).Screenshots / screencast
None provided.
Changelog text for these changes
Bug: Duplicating an ACT pod now preserves all custom fields instead of collapsing down to 5. #7390 (@faisalahammad)
PR checklist