WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#30887 new defect (bug)

Imported media relies on GUID for download

Reported by: pathartl Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Import Keywords:
Focuses: Cc:

Description

When importing media with the importer plugin, the GUID is used as the URL for downloading the files. If there is more than two levels of sites you're importing between this creates an issue with flow.

In example, say you have three sites: http://siteone.com (Original WP install) http://sitetwo.com http://sitethree.com

Exporting from http://siteone.com and importing on http://sitetwo.com the files will be downloaded from http://siteone.com.

However, if you export from http://sitetwo.com and import into http://sitethree.com, without changing the GUID, the files will be downloaded from http://siteone.com

In most cases http://siteone.com would be nonexistent or unreachable at this point, thus the media items cannot be imported.

Note that wp_get_attachment_url had this same defect (7622)

Change History (3)

#1 @DrewAPicture
3 years ago

  • Keywords close added
  • Version trunk deleted

This seems like expected behavior to me. The guid is meant to persist with the attachment post data, which means that if you moved the content twice, the original guid would persist as expected.

#2 @dd32
3 years ago

Although this might be the expected behaviour of the exporter/importer, it's most definately an incorrect assumption.

We shouldn't be relying upon the GUID for anything other than "This is item X", it should never be treated as a permanent URL.

#3 @dd32
3 years ago

  • Keywords close removed
Note: See TracTickets for help on using tickets.