Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#4025 closed defect (bug) (fixed)

WXR importing does not treat change of post_parent

Reported by: takayukister Owned by:
Milestone: 2.2 Priority: high
Severity: normal Version: 2.2
Component: Administration Keywords: import has-patch WXR
Focuses: Cc:


Importing of WordPress eXtended RSS (WXR) newly assigns ID to each posts, instead it takes over old ID from exporting. Because the post_parent column of post is not correctly changed to the new ID, this causes break of parent-child relationship between posts. All pages which has parent page and all attachments can be orphaned.

Attachments (1)

import-wordpress.diff (3.3 KB) - added by takayukister 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @takayukister
11 years ago

I wrote a patch for this. Which does two things,

1) If importing post has post_parent and the parent post is not processed yet, process the parent first.
2) Remember old and new ID of post, and rewrite each post_parent old to new.

#2 @foolswisdom
11 years ago

  • Milestone changed from 2.3 to 2.2

#3 @JeremyVisser
11 years ago


Coincidentally, I just encountered this while migrating my WordPress blog to a WordPress MU blog, and realising the page tree hadn't been saved.

#4 @technosailor
11 years ago

I created another fix, not knowing this one was here, that has less code changes. It may or may not be as effective. [3840]

#6 @ryan
11 years ago

  • Priority changed from low to high

#7 @foolswisdom
11 years ago

  • Keywords WXR added

#8 @ryan
11 years ago

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

(In [5245]) Preserve page hierarchy. Props takayukister. fixes #4025

Note: See TracTickets for help on using tickets.