Ticket #4025 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

WXR importing does not treat change of post_parent

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

Description

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

import-wordpress.diff (3.3 kB) - added by takayukister on 03/24/07 09:50:36.

Change History

03/24/07 09:50:36 changed by takayukister

  • attachment import-wordpress.diff added.

03/24/07 09:53:26 changed by takayukister

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.

03/26/07 17:22:51 changed by foolswisdom

  • milestone changed from 2.3 to 2.2.

03/26/07 23:44:33 changed by JeremyVisser

+1.

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

03/31/07 19:30:14 changed by technosailor

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

03/31/07 19:31:01 changed by technosailor

04/02/07 19:43:50 changed by ryan

  • priority changed from low to high.

04/10/07 18:47:40 changed by foolswisdom

  • keywords changed from import has-patch to import has-patch WXR.

04/12/07 01:34:17 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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