Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#11118 closed enhancement (fixed)

Add blog author data near top of export file

Reported by: briancolinger's profile briancolinger Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 2.9
Component: Export Keywords: exporter, WXR, has-patch
Focuses: Cc:

Description

Reading WXR to find post authors is slow. The entire file has to be scanned to find all authors.
Putting them near the top of the file would allow the importer to read the user list without having to scan the entire file.
I've attached a patch to enable this.

Attachments (2)

export.patch (2.0 KB) - added by briancolinger 14 years ago.
re-structuring the xml tags for users
export.php.patch (2.2 KB) - added by briancolinger 14 years ago.

Download all attachments as: .zip

Change History (16)

#1 @lloydbudd
14 years ago

  • Keywords WXR added
  • Milestone changed from Unassigned to 3.0
  • Version set to 2.9

@briancolinger
14 years ago

re-structuring the xml tags for users

#2 @briancolinger
14 years ago

Changed the XML tags to follow convention.
<wp:users> root tag for containing users.
<wp:user> tag to contain each user record.

#3 @ocean90
14 years ago

  • Keywords has-patch added

#4 @dd32
14 years ago

Is this used by the importer at present? Or is this for non-WP platforms?

#5 @xibe
14 years ago

Indeed. It's one thing to change the export format, it's another to allow the importer to use it properly.

#6 @briancolinger
14 years ago

No, the importer does not read this format yet. I can make a patch for the importer check the version of the WXR, then use the data if it is present.

#7 @dd32
14 years ago

Patch review:

  • Would SELECT DISTINCT perhaps be better than a GROUP BY?
  • <wp:users> might not be the best naming, since it only contains post authors, <wp:authors> might suit better?
  • Seems putting it in a <wp:users> is out of sync with the file, It holds everything as a flat index, ie. <wp:user>....</wp:user><wp:user>....</wp:user>, Without a wrapper around it all.

#8 @Denis-de-Bernardy
14 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 3.0 to Future Release

other notes:

  • get_results(select *) rather than a get_col(select id) would be sweeter. then we fill the cache so as to avoid a zillion queries on sites with multitudes of authors
  • also, it's important to only retrieve post authors (possibly comment authors as well?), rather than all users from an entire WPMU install
  • importer most welcome too

#9 @lloydbudd
14 years ago

  • Cc lloydomattic@… added

#10 @briancolinger
14 years ago

I've made some of the suggested changes to the export patch. As far as the importer changes go, I would like to get these exporter changes finalized first.

#11 @lloydbudd
14 years ago

  • Milestone changed from Future Release to 3.1

#12 @ocean90
14 years ago

  • Keywords has-patch added; needs-patch removed

#13 @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15961]) Importer and exporter overhaul, mega props duck.

Exporter overhaul:

  • Add author information to export
  • Greater usage of slug identifiers
  • Don't export auto-drafts, spam comments, or edit lock/last meta keys
  • Inline documentation improvements
  • Remove filtering for now (@todo)
  • Bump WXR version to 1.1, but remain back compat in the importer

Importer overhaul (http://plugins.trac.wordpress.org/changeset/304249):

  • Use an XML parser where available (SimpleXML, XML Parser)
  • Proper import support for navigation menus
  • Many bug fixes, specifically improvements to category and custom taxonomy handling
  • Better author/user mapping

Fixes #5447 #5460 #7400 #7973 #8471 #9237 #10319 #11118 #11144 #11354 #11574 #12685 #13364 #13394 #13453 #13454 #13627 #14306 #14442 #14524 #14750 #15055 #15091 #15108.

See #15197.

#14 @nacin
13 years ago

  • Milestone changed from Awaiting Triage to 3.1
Note: See TracTickets for help on using tickets.