[wp-testers] Problem with LiveJournal import (2.8)
cim008 at filklore.co.uk
Thu Mar 5 12:44:29 GMT 2009
I've just moved onto the nightly build for the improved LiveJournal import
in 2.8, having previously been experimenting with my own code, with mixed
success. The version I am using was grabbed 03 March 2009, 08:11:25. My
Wordpress blog is in development (as a resplacement/adjunct to my existing
Blogger/LJ setup, so stability is not an immediate issue.
However, I think I've encountered an issue with the part of the code in
wp-admin/import/livejournal.php around line 862, where a compare of $maxid
and $highest_id determines whether all comments have been downloaded, or if
another batch loop is required.
Basically, if the last LiveJournal comment made has been deleted (on
LiveJournal) at the time of running the import, then $max_id will always be
greater than $highest_id, and an infinite loop occurs, even though we have
actually imported all the (non-deleted) comments.
I have tested this as follows:
1) Make new LJ comment, and run import - succeeds, no batch loop.
2) Make new LJ comment, and then delete it; then run import - infinite loop
3) Make new LJ comment, and run import - now succeeds again , no batch loop.
I think the actual problem is that the code filters out deleted comments in
line 530, before we reach the later point, so if the highest comment is a
deleted one, we lose its value for $highest_id. Although we don't want to
actually import the deleted comments, we do need their comment IDs.
I'm new to this list, so I hope the above makes sense and is useful. Please
let me know if there is any other information I needed to provide. As it
happens, I am already making bespoke changes to (a copy of) livejournal.php,
so it is not a biggie for me, but others may encounter the same problem.
More information about the wp-testers