#3840 closed defect (bug) (duplicate)
WXR imported pages dissapear
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | WXR import export pages CMS |
Focuses: | Cc: |
Description
when importing via a wordpress-generated export file (XML file), any pages that have a value for post_parent dissapear from the dashboard ( Manage > Pages ), and must be editted in PHPMyAdmin or similar to assign them a new post_parent value that reflects the new page ID's.
Attachments (1)
Change History (11)
#6
@
18 years ago
This patch simply takes source blog ID numbers and places them in a lookup array with new post IDs. This way, we can refer to the the lookup array for proper post_parent associations.
Up for suggestions on a more elegant solution that doesn't query mysql.
#7
@
18 years ago
Hi technosailor,
I checked this patch and found a defect. In case pretty permalink is used, it can generate incorrect guid. For example, when a page "Child" has a parent page "Parent", the child's guid should be:
http://example.com/parent/child
But applied this patch, it'll be:
http://example.com//child
This is because the original importing code uses wp_insert_post() to generate new posts, it needs the post name of the parent page to generate child's guid. So I think it would be safe to process parent first. (I created another patch. http://trac.wordpress.org/ticket/4025 If two places are reporting the same issue, should we merge?)
#8
@
18 years ago
takayukister,
I'm happy if your patch is used. I think the key thing is that _a_ patch gets applied relatively soon. In addition, there are quite a few WXR bugs in trac. Maybe you want to expand your patch to address those issues as well and we can get one of the guys to commit and kill multiple birds with one stone.
Thanks for the feedback.
export environment: IIS, with MySQL 4.1.21-community-nt
PHP Version 4.3.1 CGI/FastCGI
import environment (XAMPP): Apache/2.2.2 (Win32), MySQL - 5.0.21-community-nt, PHP/5.1.4