wordpress-importer
wordpress-importer copied to clipboard
Shared block references aren't updated on import
In 5.0's block editor, shared block references (ex. <!-- wp:block {"ref":10} /-->
) aren't updated when importing posts. The reference breaks when the shared block has a different post ID on the new site.
Steps to Reproduce
Original Site:
- Using the block editor, create several pages that reference the same shared block.
- Export the WXR file with all posts.
- Note the post ID of the
wp_block
post for the shared block.
New Site:
- Make sure the post ID for the shared block is already taken by a different kind of post type. For example, if in the original site the shared block had a post ID of
10
, make sure that exists (https://example.com/wp-admin/post.php?post=10&action=edit). - Import the WXR file.
- Attempt to edit the imported pages that reference the shared block. --> Expected: Shared block is imported and the IDs of all shared block references are mapped correctly. --> Actual: Shared block references are broken and unchanged with the ID from the originating site.