Skip to content

Fix duplicating a Pod collapsing down to only 5 fields - #7597

Open
faisalahammad wants to merge 2 commits into
pods-framework:release/3.4.0from
faisalahammad:fix/7390-duplicate-pod-fields
Open

Fix duplicating a Pod collapsing down to only 5 fields#7597
faisalahammad wants to merge 2 commits into
pods-framework:release/3.4.0from
faisalahammad:fix/7390-duplicate-pod-fields

Conversation

@faisalahammad

Copy link
Copy Markdown
Contributor

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_groups flag that only the duplicate routine sets. It tells save_pod to 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

  1. Create an ACT pod (Content Type "Pod") with a group named details and 10 custom fields.
  2. Mouse over the pod and click Duplicate.
  3. Verify the duplicate contains all 10 custom fields plus the standard created, modified, author, permalink fields (14 total).
  4. Create a new ACT pod and Save to confirm it still auto-creates the standard Details group / 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

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
faisalahammad force-pushed the fix/7390-duplicate-pod-fields branch from ae0aa7c to 12848da Compare August 9, 2026 19:01
@faisalahammad
faisalahammad changed the base branch from main to release/3.4.0 August 18, 2026 11:13
@faisalahammad

Copy link
Copy Markdown
Contributor Author

AI disclosure: this PR was written with Claude Opus 5 assistance, reviewed and tested by me.

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.

Clicking to duplicate a POD only duplicates up to 5 fields

1 participant