[wp-testers] Problem with LiveJournal import (2.8)

Peter Westwood peter.westwood at ftwr.co.uk
Thu Mar 5 21:30:00 GMT 2009


On 5 Mar 2009, at 12:44, Chris Malme wrote:

> 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
> occurs.
>
> 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.
>

Could you raise a bug report in trac and attach a patch with this and  
any other fixes you make.

Many Thanks

westi
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-testers mailing list