wordpress-importer icon indicating copy to clipboard operation
wordpress-importer copied to clipboard

Shared block references aren't updated on import

Open jom opened this issue 6 years ago • 0 comments

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:

  1. Using the block editor, create several pages that reference the same shared block.
  2. Export the WXR file with all posts.
  3. Note the post ID of the wp_block post for the shared block.

New Site:

  1. 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).
  2. Import the WXR file.
  3. 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.

jom avatar Dec 06 '18 13:12 jom