Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#15634 closed enhancement (fixed)

WP Importer should warn if WXR format is newer than it nows about

Reported by: lloydbudd Owned by: duck_
Milestone: WordPress.org Priority: low
Severity: minor Version: 3.1
Component: Import Keywords: has-patch
Focuses: Cc:


WP Importer should warn and recommend upgrade if WXR format is newer than it is aware of.


I noticed that the WP 3.1 export (deployed to WordPress.com) didn't assign categories if imported into 3.0.

Attachments (4)

15634.warn-on-wxr-version.diff (3.3 KB) - added by duck_ 7 years ago.
15634.warn-on-update.diff (798 bytes) - added by duck_ 7 years ago.
15634.combined.diff (3.9 KB) - added by duck_ 7 years ago.
warnings.png (19.9 KB) - added by duck_ 7 years ago.

Download all attachments as: .zip

Change History (9)

#1 @nacin
7 years ago

  • Cc duck_ added
  • Milestone changed from Awaiting Review to WordPress.org

Worked if importing using the new importer though, right?

#2 @nacin
7 years ago

  • Component changed from WordPress.org site to Import

#3 @duck_
7 years ago

  • Keywords has-patch added

Attached patches for two different approaches:

  • 15634.warn-on-wxr-version.diff will hardcode a maximum supported version into the importer plugin. A warning is then displayed if a file is uploaded which has a greater version specified in the wp:wxr_version tag.
  • 15634.warn-on-update.diff will display a warning if there is an update available for the WordPress importer. This works on the assumption that if the export file format is bumped then a new plugin will also be pushed to support the extra features.

It may also be possible to block operation instead of just displaying a warning, but this seems rather extreme. It could also be the case that the export format version number gets bumped but old importers are still compatible (don't know of a such a scenario off the top of my head), in this case I think the warn-on-update might be better.

7 years ago

7 years ago

#4 @duck_
7 years ago

Attached a patch to combine both approaches and also what is seen if both triggers are set off. The 'warn-on-update' note shows on every screen for the importer, the 'warn-on-wxr-version' will only show on the screen immediately after uploading a WXR file (the assign authors screen).

#5 @duck_
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.