Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#11484 closed defect (bug) (worksforme)

Comments are incorrectly imported

Reported by: dleshem's profile dleshem Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: Import Keywords: wxr comments import
Focuses: Cc:

Description

I'm trying to export an existing WordPress blog (v2.2.1) and import it to a new WordPress blog (v2.8.6).

The XML file WordPress created looks fine, and indeed the import process appears to work (specifying the single exported post was correctly imported with the right number of comments).

However, when viewing the imported post in the new blog, it shows with zero comments. In the management console, I see the imported comments under the "comments" section, but they are not "connected" to any post.

Attached is the WordPress WXR file. The issue was verified with a new installation of WordPress 2.6.8 (both English and Hebrew editions).

Attachments (1)

wordpress.2009-12-18.xml (35.9 KB) - added by dleshem 15 years ago.
WXR file reproducing the issue

Download all attachments as: .zip

Change History (14)

@dleshem
15 years ago

WXR file reproducing the issue

#1 @dleshem
15 years ago

Correction: the last line should of course read "The issue was verified with a new installation of WordPress 2.8.6 (both English and Hebrew editions)."

#2 @ryan
15 years ago

  • Milestone changed from 2.9 to 3.0

2.9 fixes some issues with comment import, although I'm not sure unconnected comments was one of them.

Setting milestone to 3.0 since 2.9 is about to release.

#3 @dleshem
15 years ago

Addition:
May or may not be related to this help request on the WordPress forums.

#4 @nacin
15 years ago

With WP_DEBUG on, importing that XML file results in these notices:

Notice: Undefined index: attachments in C:\xampp\htdocs\2.9\wp-admin\import\wordpress.php on line 845

Notice: Undefined offset: 1 in C:\xampp\htdocs\2.9\wp-admin\import\wordpress.php on line 63

This is $return = preg_replace('|<!\[CDATA\[(.*)\]\]>$|s', '$1', $return[1]);

Notice: Undefined index: comment_agent in C:\xampp\htdocs\2.9\wp-includes\comment.php on line 1134

#5 follow-up: @dleshem
15 years ago

Addition: May also be related to this other help request on the WordPress forums. This issue seems to be quite widespread.

#6 @dleshem
15 years ago

  • Milestone changed from 3.0 to 2.9.1
  • Version changed from 2.8.6 to 2.9

Same issue happens in WordPress 2.9

#7 follow-up: @westi
15 years ago

I have just tested this with an import on current 3.0-alpha which has the same import code as 2.9 and I get a single post imported with 22 comments attached too it.

I selected the create a user option and ended up with a new user which was not correctly setup - exports contain the display name which is this case does not sanitise down to a valid user_login - see #10319.

#8 @westi
15 years ago

(In [12469]) Fix some notices in the importer when importing files from old WordPress versions or not fetching attachments. See #11484.
Ensure that we check that a user is created for the username we specify and otherwise fallback to the current user
See #10319.

#9 in reply to: ↑ 5 @westi
15 years ago

  • Milestone changed from 2.9.1 to 3.0
  • Priority changed from high to normal
  • Severity changed from blocker to normal
  • Version changed from 2.9 to 2.8

Replying to dleshem:

Addition:
May or may not be related to this help request on the WordPress forums.

This relates to the Blogger importer not the WordPress importer

Replying to dleshem:

Addition: May also be related to this other help request on the WordPress forums. This issue seems to be quite widespread.

This is from Dec 2006 and I think is quite out of date now.

The above change will fix the notices (for 3.0). I can't reproduce your failure to import in my testing locally and have run this test a number of times.

Moving to 3.0 milestone and waiting for more feedback on how to reproduce this issue in 2.9

#10 in reply to: ↑ 7 ; follow-up: @dleshem
15 years ago

Replying to westi:

I have just tested this with an import on current 3.0-alpha which has the same import code as 2.9 and I get a single post imported with 22 comments attached too it.

The importer indeed REPORTS that a single post was imported with 22 comments. But then, when I actually browse to the post page no comments are displayed, and when I check the comments section in the management console the comments are no displayed either (v2.9) or displayed but not connected to the post (v2.8.6).

Does the import work for you "all the way", or did you stop checking after the import report message?

#11 in reply to: ↑ 10 @westi
15 years ago

Replying to dleshem:

Does the import work for you "all the way", or did you stop checking after the import report message?

"all the way"

The post appeared as a published post on the blog.
The comments appeared associated with that published post.

#12 @dleshem
15 years ago

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

Tested with wordpress.com and it indeed seems to work fine.
This might be an compatibility issue with the Quercus PHP engine, reported the bug there.
Thanks for the prompt feedback everyone.

#13 @nacin
15 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.