Ready to get started?Download WordPress


import-blogger.php not working (11 posts)

  1. Waleed
    Posted 8 years ago #


    I have followed the instructions for importing Blogger to WP (from http://wiki.wordpress.org/BloggerImport and from import-blogger.php itself too). However, when I click on the OK button at the bottom of the page, nothing happens. The page simply reloads itself and nothing happens.

    This is the url that I see:

    I'm using WP1.5.2

    What could the possible errors be?

    Thanks guys!


  2. carthik
    Posted 8 years ago #

    It could be that the import script cannot read the files that are supposed to be there?

    Are you sure that blogger exported everything just right, onto your server? You can check to see if the entry files exist on your server.

  3. Waleed
    Posted 8 years ago #

    Yes Carthik, I see the files in my root directory of WP installation. I've double-checked the blogger.com template code (as see on import-blogger.php file).

    where are the blogger files supposed to be? Root dir, correct?
    What other factors could be affecting this?

    Thanks Carthik!

  4. Tishi
    Posted 8 years ago #

    I dont know if this will help or not, but if you are on a host like dreamhost sometimes the ?x=blah part of those urls will work but not the &x=bleh bit for some reason. I've had experience with that myself.

  5. Waleed
    Posted 8 years ago #

    No, I don't think so. WordPress runs fine otherwise though, except for the import-blogger.php problem here.
    Can anybody take a look at my server possibly?


  6. justinmcelroy
    Posted 8 years ago #

    Yes. I've been having the exact same problem over at http://getthesugar.com. I know that everything else is correct, and the files are all hunky dory in my folder.

  7. justinmcelroy
    Posted 8 years ago #

    I guess I should give more info, so we can try to get this worked out together. I'm using Canaca.net for my hosting needs. The php files for my three months of archiving are definately on there, but there's also a directory called "2005" that has all my posts in html form. It's creating both of those each time. When I run import-blogger.php, the instructions show up, but when I click OK, the page simply reloads. I'm using a Mac. I've tried it with Firefox and IE.

    Thanks for any help you can offer.

  8. Valerie
    Posted 8 years ago #

    I was having the same problem. Then I found my way here: http://catsutorials.catsudon.org/?p=15. It's the visual tutorial for a slightly modified version of import-blogger.php (it also collects blogger comments!). It's helpful, btw. It confirmed for me that I did everything correctly, but the import script still did nothing.

    With a feeling that it sure couldn't hurt - I didn't know where else to turn - I began reading the comments to the tutorial. Toward the bottom I found a comment by Brad ( http://catsutorials.catsudon.org/?p=15#comment-253 ), posted yesterday, who'd been having this same problem along with many others as shown in other comments. Well, ol' Brad found a solution!

    He stripped down the import file to make the script run as soon as you opened the file in your browser. He posted a link to his greatly modified script: http://alittlebitleft.com/import-blogger.phps. It worked! All the blogger files I was trying to import are now safely tucked away in their new WordPress home!

    *Of course, this only works AFTER you've gotten all your blogger files in the proper place on your server. (This is for those who are less familiar with working with php.) If you are not sure what to do, be sure to read the comments on the above-mentioned tutorial.

  9. Valerie
    Posted 8 years ago #

    Quick Update:

    Upon stumbling over this exact same problem (page merely reloads after clicking "OK" with junk added to the end of the URL) while using Justin's excellent import-haloscan script, but having no quick and dirty stripped down script like the one I linked to above for importing blogger posts, I wrote Justin and asked if he would be willing to similarly customize his script for my use.

    Well, I believe he has found the appropriate solution for both scripts! He changed a very small part of the script so that it uses a different mechanism for determing whether the "OK" button has been clicked.

    He doesn't guarantee whether it's the best solution or the most secure solution, but it certainly does work.

    Apparently the problem lies in some kind of change in the core WP code between and 1.5.2.

    The change to make in the import-blogger script included with the wp1.5.2 download is to replace lines 3-17, which should look like this:

    $wpvarstoreset = array('action');
    for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    $wpvar = $wpvarstoreset[$i];
    if (!isset($$wpvar)) {
    if (empty($_POST["$wpvar"])) {
    if (empty($_GET["$wpvar"])) {
    $$wpvar = '';
    } else {
    $$wpvar = $_GET["$wpvar"];
    } else {
    $$wpvar = $_POST["$wpvar"];

    with this line:

    $action = $_REQUEST['action'];

    I haven't tried this change with the blogger script, but it should work. Of course, use it at your own risk.

  10. JoshHendo
    Posted 8 years ago #

    Hello. I had this problem too. As a php programer I thought i would take a look at the scirpt to try and see what was wrong with it. After editing the script a bit, and trying it, i was pleasently suprised when it worked. Below is a zip download link to download the file. Once you have downloaded it, replace it with the old one :)
    (Though I must say it doesn't import comments, though I am working on that ;) )

    You use this edited script at your own risk.


  11. www.onlinecasinoselite.com
    Posted 8 years ago #

    Seems the script is somewhat broken in 1.5.2. Looks like the $action variable isn't populated, might have something to do with register_globals although I couldn't be bothered to read through the code. The script from JoshHendo worked fine for me.

Topic Closed

This topic has been closed to new replies.

About this Topic