Migrate Packages: remap bi-directional sister_id on import - #7584
Open
pdclark wants to merge 1 commit into
Open
Conversation
pdclark
force-pushed
the
fix/package-sister-id
branch
from
July 31, 2026 18:07
4430847 to
c5d5c42
Compare
Collaborator
Author
TestsSeveral CI tests were resolved via One CI test was resolved via The only remaining test, Package JSONAn example of the revised pods.json export is below. The addition is field key {
"@meta": {
"version": "3.3.9",
"build": 1785470656
},
"settings": {
"types_only": "0",
"watch_changed_fields": "0",
"metadata_integration": "0",
"metadata_override_get": "0",
"register_meta_integration": "0",
"media_modal_fields": "0",
"autocomplete_limit": "15",
"session_auto_start": "0",
"dynamic_features_allow": "1",
"dynamic_features_enabled": [
"display",
"form"
],
"show_access_restricted_messages": "0",
"show_access_admin_notices": "1",
"dynamic_features_allow_sql_clauses": "0",
"display_callbacks": "customized",
"display_callbacks_allowed": "esc_attr,esc_html",
"wisdom_opt_out": "1",
"active_components": [
"migrate-packages",
"templates"
]
},
"pods": [
{
"name": "comment",
"id": 34,
"label": "Comment",
"description": "",
"type": "comment",
"storage": "meta",
"object": "comment",
"_migrated_28": "0",
"groups": [
{
"name": "more_fields",
"id": 35,
"label": "More Fields",
"description": "",
"weight": 0,
"fields": [
{
"name": "rel_cpt",
"id": 36,
"label": "Rel CPT",
"description": "",
"weight": 0,
"type": "pick",
"pick_object": "post_type",
"pick_val": "cpt_one",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"required": "0",
"sister_field": "rel_comments",
"sister_id": "56"
}
]
}
]
},
{
"name": "cpt_one",
"id": 37,
"label": "CPT One",
"description": "",
"type": "post_type",
"storage": "meta",
"label_singular": "CPT One",
"public": "1",
"show_ui": "1",
"publicly_queryable": "1",
"dynamic_features_allow": "inherit",
"rest_enable": "1",
"supports_title": "1",
"supports_editor": "1",
"_migrated_28": "1",
"groups": [
{
"name": "more_fields",
"id": 38,
"label": "More Fields",
"description": "",
"weight": 0,
"fields": [
{
"name": "rel_taxonomy",
"id": 53,
"label": "Rel Taxonomy",
"description": "",
"weight": 0,
"type": "pick",
"pick_object": "taxonomy",
"pick_val": "taxonomy_one",
"sister_id": "49",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"revisions_revision_field": "0",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_cpt"
},
{
"name": "rel_cpt",
"id": 54,
"label": "Rel CPT",
"description": "",
"weight": 1,
"type": "pick",
"pick_object": "post_type",
"pick_val": "cpt_one",
"sister_id": "54",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"revisions_revision_field": "0",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_cpt"
},
{
"name": "rel_users",
"id": 55,
"label": "Rel Users",
"description": "",
"weight": 2,
"type": "pick",
"pick_object": "user",
"sister_id": "52",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"revisions_revision_field": "0",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_cpt"
},
{
"name": "rel_comments",
"id": 56,
"label": "Rel Comments",
"description": "",
"weight": 3,
"type": "pick",
"pick_object": "comment",
"sister_id": "36",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"revisions_revision_field": "0",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_cpt"
},
{
"name": "rel_media",
"id": 57,
"label": "Rel Media",
"description": "",
"weight": 4,
"type": "pick",
"pick_object": "media",
"sister_id": "46",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"revisions_revision_field": "0",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_cpt"
}
]
}
]
},
{
"name": "media",
"id": 44,
"label": "Media",
"description": "",
"type": "media",
"storage": "meta",
"object": "media",
"_migrated_28": "0",
"groups": [
{
"name": "more_fields",
"id": 45,
"label": "More Fields",
"description": "",
"weight": 0,
"fields": [
{
"name": "rel_cpt",
"id": 46,
"label": "Rel CPT",
"description": "",
"weight": 0,
"type": "pick",
"pick_object": "post_type",
"pick_val": "cpt_one",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_media",
"sister_id": "57"
}
]
}
]
},
{
"name": "taxonomy_one",
"id": 47,
"label": "Taxonomy Ones",
"description": "",
"type": "taxonomy",
"storage": "meta",
"label_singular": "Taxonomy One",
"public": "1",
"show_ui": "1",
"hierarchical": "1",
"publicly_queryable": "1",
"dynamic_features_allow": "inherit",
"rest_enable": "1",
"_migrated_28": "0",
"groups": [
{
"name": "more_fields",
"id": 48,
"label": "More Fields",
"description": "",
"weight": 0,
"fields": [
{
"name": "rel_cpt",
"id": 49,
"label": "Rel CPT",
"description": "",
"weight": 0,
"type": "pick",
"pick_object": "post_type",
"pick_val": "cpt_one",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_taxonomy",
"sister_id": "53"
}
]
}
]
},
{
"name": "user",
"id": 50,
"label": "User",
"description": "",
"type": "user",
"storage": "meta",
"object": "user",
"_migrated_28": "0",
"groups": [
{
"name": "more_fields",
"id": 51,
"label": "More Fields",
"description": "",
"weight": 0,
"fields": [
{
"name": "rel_cpt",
"id": 52,
"label": "Rel CPT",
"description": "",
"weight": 0,
"type": "pick",
"pick_object": "post_type",
"pick_val": "cpt_one",
"pick_format_type": "single",
"pick_format_single": "dropdown",
"pick_format_multi": "list",
"pick_display_format_multi": "default",
"pick_display_format_separator": ", ",
"pick_allow_add_new": "1",
"pick_taggable": "0",
"pick_show_icon": "1",
"pick_show_edit_link": "1",
"pick_show_view_link": "1",
"pick_limit": "0",
"pick_user_role": "Administrator",
"pick_sync_taxonomy": "0",
"pick_sync_taxonomy_hide_taxonomy_ui": "0",
"pick_post_status": "publish",
"pick_post_author": "0",
"repeatable": "0",
"repeatable_format": "default",
"default_evaluate_tags": "0",
"default_empty_fields": "0",
"roles_allowed": "administrator",
"enable_conditional_logic": "0",
"conditional_logic_save_value": "0",
"rest_pick_response": "array",
"rest_pick_depth": "1",
"required": "0",
"sister_field": "rel_users",
"sister_id": "55"
}
]
}
]
}
]
} |
pdclark
force-pushed
the
fix/package-sister-id
branch
from
July 31, 2026 18:27
c5d5c42 to
ca58b1a
Compare
Packages store sister_id as a source-site wp_posts.ID; import could create fields with new IDs, but required re-assignment - export() now also emits sister_field (the sister field's name) as a portable reference; sister_id stays for backward compatibility. - import() maps package field IDs to pod/field names after all pods are saved; resolves each pick field's reference (by sister_field name, else by old-ID map) and saves the new sister_id. Unresolvable references are cleared to 0. composer.json, re: CI environment requirements: - webonyx/graphql-php set to ignore PKSA advisories for 15.29.3. Testing only; package should be updated / advisories resolved for production. Caused by a dependency of wp-graphql. - wpsentex/polylang changed from dev-master to ^3.8.6, CI blocked use of dev-* tag (stability requirement). - fzaninotto/faker was archived in 2020 and capped at PHP 7. --ignore-platform-reqs allowed environment requirements to be ignored Slic container testing environment is PHP 8.2 symfony/console therefore installed at version 8, which uses PHP 8.5-only syntax. Removing --ignore-platform-reqs from .github/workflows/tests-php.yml would likely also resolve with fewer explicit declarations. This composer.json switches to fakerphp/faker, which allows PHP 8, and pins symfony packages to install at version 7, supporting the environment requirement of PHP 8.2. readme.txt: Require WP 6.5 according to wordpress/plugin-check-action@v1 CI test
pdclark
force-pushed
the
fix/package-sister-id
branch
from
July 31, 2026 18:32
ca58b1a to
3c9ebf5
Compare
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.
Packages store sister_id as a source-site wp_posts.ID; import could create fields with new IDs, but required re-assignment
Description
See https://wordpress.org/support/topic/bi-directional-field-not-working-after-import-package/
Testing instructions
Changelog text for these changes
Include bidirectional fields in Pods Package Import/Export
PR checklist