Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export & Import of blocks into another website doesn't update media IDs in block code #19968

Open
boomtemp123 opened this issue Jan 30, 2020 · 2 comments
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.

Comments

@boomtemp123
Copy link

Describe the bug
If you export via the WordPress export tool or by using the "Copy All Content" option from Gutenberg the post_content imported/pasted into a new website contains references to the old website's media IDs which do not exist on the new website. These IDs could be used for another media object in future.

To reproduce
Steps to reproduce the behavior:

  1. Create a page with some image/media based blocks
  2. Export a page using WordPress standard exporter or copy all content by clicking "Copy All Content" option from Gutenberg's right menu.
  3. Import/paste into a new website
  4. View the code in Gutenberg's code editor
  5. You will see references to media IDs which do not exist on the new website, these are the old media IDs from the old website.

Expected behavior
Ideal is some way of the media items being transferred to the new website, if not just don't use the old IDs as there could be clashes in future.

@jorgefilipecosta jorgefilipecosta added [Feature] Media Anything that impacts the experience of managing media [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement. labels Feb 3, 2020
@boomtemp123
Copy link
Author

Note that this issue has the [feature] reusable block label - but it effects all blocks not just reusable.

@noisysocks
Copy link
Member

Yes that's true. All blocks that use an "id" attribute have this issue: images, galleries, reusable blocks, etc.

@skorasaurus skorasaurus removed the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants