Description
I've discovered an issue with Pods relationship fields not being properly duplicated when content is translated using Polylang or imported via wordpress-import.
When a post containing Pods relationship fields is translated using Polylang (or imported via XML), the metadata in wp_postmeta is correctly duplicated, but the actual relationships in the wp_podsrel table are not completely copied to the new post.
Investigation Results
When examining the database:
-
In wp_postmeta, both the original and translated posts have identical metadata for the relationship field (except hidden field _pods_xxx with serialized data I manually had in my pll_copy_post_metas hook)
-
However, in wp_podsrel, the relationships are not fully duplicated:
- Original post (ID: 190) has entries for all relationships (e.g., roles 95, 97, 111)
- Translated post (ID: 195) only has no relationships
Environment
- WordPress version: 6.7.2
- Pods version: 3.2.8.2
- Polylang version: 3.6.7
- PHP version: 8.3
Additional Information
This appears to be related to how Pods stores relationship data across two locations:
- Serialized metadata in
wp_postmeta
- Relationship records in
wp_podsrel
Version
3.2.8.2
Testing Instructions
- Create a post with a Pods relationship field (in my case, a widget with role relationships)
- Set multiple related items in the relationship field (for example, selecting multiple roles)
- Create a translation of this post using Polylang with the option to copy fields
- Check the translated post in the admin UI - initially no relationships appear (no checkboxes are selected in the translated version, even though all appropriate checkboxes were selected in the original).
Screenshots / Screencast




Possible Workaround
Pods could provide a hook that automatically rebuilds the relationship entries in the wp_podsrel table based on the pods* metadata that is already correctly duplicated during translation or import processes.
Site Health Information
Pods Package
Description
I've discovered an issue with Pods relationship fields not being properly duplicated when content is translated using Polylang or imported via wordpress-import.
When a post containing Pods relationship fields is translated using Polylang (or imported via XML), the metadata in
wp_postmetais correctly duplicated, but the actual relationships in thewp_podsreltable are not completely copied to the new post.Investigation Results
When examining the database:
In
wp_postmeta, both the original and translated posts have identical metadata for the relationship field (except hidden field _pods_xxx with serialized data I manually had in my pll_copy_post_metas hook)However, in
wp_podsrel, the relationships are not fully duplicated:Environment
Additional Information
This appears to be related to how Pods stores relationship data across two locations:
wp_postmetawp_podsrelVersion
3.2.8.2
Testing Instructions
Screenshots / Screencast
Possible Workaround
Pods could provide a hook that automatically rebuilds the relationship entries in the wp_podsrel table based on the pods* metadata that is already correctly duplicated during translation or import processes.
Site Health Information
Pods Package