• I saved my livejournal archives as xml files, but i’m having trouble editing the import-livejournal.php file. I must be doing it wong. I’ll edit it, then run the php, then when i click “lets go” it takes me to a page where it says “you need to edit as described in the previous page” then it gives me a link to edit an rss file?? Whats with the rss?? I thought it was XML i had to import?
    This is really confusing me.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter cynikalsam

    (@cynikalsam)

    I uploaded the xml files to the wp-admin folder.. If anybody needs more info to help me, just let me know..

    Thread Starter cynikalsam

    (@cynikalsam)

    Ok, here’s some more detailed info;
    In the import-livejournal.php file, there are a few lines of code like this;
    define('XMLFILE', '');
    My xml file is named 200405.xml, so i would edit that code like this;
    define('XMLFILE', '200405.xml');
    The 200405.xml file is in the same folder as the import-livejournal folder. Did i do this right? Cause its not working..

    Looks like you did it right–if the xml file you have is actually named that. Make absolutley sure you haven’t missed a dash or an underscore or some other punctuation in the file name.
    If you haven’t, and the livejournal xml files are in the wp-admin directory, then it should import that months entries.
    Um… wait a second… Make sure you’re putting the file name in the right place:
    <?php
    define('FILE NAME HERE');
    // Example:
    // define('XMLFILE', '/home/example/public_html/rss.xml');
    // or if it's in the same directory as import-rss.php
    // define('XMLFILE', 'rss.xml');

    The other places are just comments to give you an example, and they’re copied from the rss importing file.
    If you’ve done all that, I’m afraid I don’t know what’s wrong.

    Different problem but similar situation.
    I’ve been trying to migrate away from LiveJournal and am VERY impressed with WordPress. I’ve managed to export my journal to XML via two seperate methods, 1) is the livejournal export feature on the livejournal site it’s self 2) is the program called ljArcive. Let me first just say that everything imports fine, except for HTML.
    There is mention of a problem like this in documentation on the wiki here which involves changing a line beginning with $content in a file called import-livejournal.xml HOWEVER there is no import-livejournal.xml, I’ve tried changing the $content line in import-livejournal.php and then importing the entries but it doesn’t work.

    Wow, you’re right it does say .xml. I never even noticed that.
    I just edited the same .php file that you did, but since I was the last person to edit that page based on my experience, lemme see what you got before I go changing it again.
    The line you changed should have been changed to:
    $content = str_replace(array('<![CDATA[',']]>'),'',html_entity_decode( addslashes( trim($content[1])));
    which was my edit.
    The original recommended change did not work for me, but this one did. If it’s what you tried and wouldn’t work, try this:
    $content = str_replace(array('<![CDATA[',']]>'),'',html_entity_decode( trim($content[1]));
    That’s what it was before I changed it, and that’s the line that did not work for me.
    Please, let me know if it works for you. If it does, I’ll edit the Wiki page to indicate both as possible fixes and that the file to be edited is wp-admin/import-livejournal.php.
    If the HTML still doesn’t go in the way you want, go ahead and share that, too. I doubt I’ll know enough to figure out what’s wrong (or even what information you need to give to figure out what’s wrong), but someone else might.

    Nope, nevermind.
    Found the problem and updated the Wiki page.
    The line should have been:
    $content = str_replace(array('<![CDATA[',']]>'),'',html_entity_decode( addslashes( trim($content[1]))));
    If that doesn’t work, I don’t know what to tell you.
    (For the curious without sharp eyes, the difference is one close parenthesis, just like this one –>)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Importing livejournal XML’ is closed to new replies.