WordPress.org

Ready to get started?Download WordPress

Forums

2.0 Import from MT problems (31 posts)

  1. ChristopherO
    Member
    Posted 8 years ago #

    I tried using import from RSS, then I remembered that my rss doesnt have any comments in.

    I have exported from MT using the old method and created a text file. Then I imported using the new import from MT option in the 2.0 admin, but it only imported the posts and no comments. Ive checked the import textfile and the comments are there.

    Any suggestions? Thanks

  2. ChristopherO
    Member
    Posted 8 years ago #

    Any ideas anyone?

  3. thaleia6
    Member
    Posted 8 years ago #

    I'm having the same problem. I get the screen which tells me all the new authors to be added. But they're not added -- nothing is added to my database. Though I do see the imported files in the wp-content directory.

    I was really hoping to move all our MT blogs over to wordpress during the winter break while no one at my company is posting to them. ><

  4. ChristopherO
    Member
    Posted 8 years ago #

    Does anyone have a solution to this? Comments are quite important and I don't want to go back a version of WP.

    Thanks

  5. gusterlover6
    Member
    Posted 8 years ago #

    I don't have a solution either, and I'm having the same problem.

  6. thaleia6
    Member
    Posted 8 years ago #

    Has anyone used the MT import link successfully? Or are people importing their posts via RSS feeds?

  7. jdm4727
    Member
    Posted 8 years ago #

    Sorry guster and thaleia...I haven't been able to get it to work either. But, actually, my problem is a bit different than yours.

    I get this when I try to upload:

    Unable to create directory /home/virtual/site420/fst/var/www/html/blog.joelmaust.com/wp-content/uploads/2005. Is /home/virtual/site420/fst/var/www/html/blog.joelmaust.com/wp-content/uploads writable?

    In reading these forms, my problems sound similar to the problems people are encountering with the file uploader. I don't know alot about this technical stuff...but it doesn't seem to matter what chmod permissions are set to...I can't get it to create the directory tree for the entries I want to import.

    Looks like it might have something to do with the ownership of the created directories belonging to apache|apache rather than my admin...but I don't know for sure.

  8. senoranderpants
    Member
    Posted 8 years ago #

    I'm having the exact problem as you, Christoper. Has anyone found a solution or workaround?

  9. senoranderpants
    Member
    Posted 8 years ago #

    Okay... I've spent an hour or two looking at this, and the problem is not that it doesn't import the comments - it does. The problem is that it imports them unapproved, and the only way to approve them is to manage posts -> click on the "0" comments and you can see them there.

    I can't find a way to mass approve the comments, since they don't show up in the "Moderate" section.

  10. senoranderpants
    Member
    Posted 8 years ago #

    Alright. Here's a fix, but it will be messy as hell, because I know NOTHING about PHP.

    In wp-admin/import/mp.php, go down to the part under "//Now for comments" where it says "//Check if it's already there"

    Replace what's there with:

    // Check if it's already there
    $comment_approved = "1";
    if (!comment_exists($comment_author, $comment_date)) {
    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_author_email', 'comment_author_IP', 'comment_date', 'comment_content', 'comment_approved');

    This basically sets "comment_approved" to "true" and then imports it into the database with that value, where it was blank before.

    Try it, but don't blame me if it makes things blow up.

  11. LisaS
    Member
    Posted 8 years ago #

    I just ran an MT import into 2.0 for a client and ran into the same issue with the comments.

    The comments do get imported - however the comment_approved field database table is blank. They are not marked as approved, unapproved or spam - it's just blank. Unassigned.

    Quick fix? Run a SQL Query via phpMyAdmin (or your choice.) Here's what did it for me:

    UPDATE wp_comments SET comment_approved = '1' WHERE comment_approved = ''

    Fixed it right up - all comments and trackbacks are present an accounted for.

    It's definitley a bug, though, that needs fixing. I can't tell you how many clients I do MT to WP imports for on a regular basis. Ugh!

  12. ChristopherO
    Member
    Posted 8 years ago #

    Thanks that was exactly it!

  13. Krissy
    Member
    Posted 8 years ago #

    Thanks LisaS but an issue came up with that.

    I imported the entries, no comments showed up, I ran your SQL query and although it lists the comments, when you look at the template it says NO COMMENTS, and when you "Manage -> Posts" it keeps a 0 in the comments field.

    Is there any other way to fix that?

  14. senoranderpants
    Member
    Posted 8 years ago #

    Lisa's solution should have worked. If you're showing 0 comments, but you can still see them when you click that zero, then they're still in approval limbo. Check your database to see what the approval status is. 0 is unapproved, 1 is approved, and nothing means that the query didn't work properly.

  15. ChristopherO
    Member
    Posted 8 years ago #

    I spoke too soon, like Krissy I have the same problem. In the database all of my comments are set to 1 (approved), but although they show up on the site, it still says no comments on the link and at the top of the comments section.

    Looking at wp_posts in the database, the comment_count field is empty, this is because we only changed the status in the comments table and didn't alter the posts table to show how many comments.

    Anyone got an idea for a php script or sql query that will go through the posts table then pull out the number of comments from the comments table for that post id?

  16. stannum
    Member
    Posted 8 years ago #

    I have found a solution!
    Instead of making the comment_approved field to '1' change them all to '0', that is,

    UPDATE wp_comments SET comment_approved = '0' WHERE comment_approved = ''

    Then they will all appear in the "awaiting moderation" section, then do a approve all! All my 2000 comments appears in the post with the comment count correctly showing in every post!!!

  17. dlature
    Member
    Posted 8 years ago #

    I tried importing an export file from MT and got the following error:

    myhostaccount

    Warning: file(c:myhostaccountdlaturewp/wp-content/uploads/2006/01/012906movable_theoblogical_6.txt): failed to open stream: No such file or directory in c:\myhostaccount\myname\wp\wp-admin\import\mt.php on line 78

    Warning: implode(): Bad arguments. in c:\myhostaccount\myname\wp\wp-admin\import\mt.php on line 79

    All done. Have fun!

    What am I doing wrong?

    (and yes, the error's first line:

    file(c:myhostaccountmynamewp/wp-content/uploads/2006/01/012906movable_theoblogical_6.txt): failed to open stream: No such file or directory in c:\myhostaccount\myname\wp\wp-admin\import\mt.php on line 78

    omits the slash between myhostaccount and myname.)

    the same export file imports into 1.5.2 without error

  18. gogogadgetearl
    Member
    Posted 8 years ago #

    i'm having the exact same problem as dlature. (and, yes, my error ommited the slashes in the directory structure, too.)

  19. dlature
    Member
    Posted 8 years ago #

    Any ideas on the previous two posts?

  20. dlature
    Member
    Posted 8 years ago #

    Anybody? Is this problem ignored? If there's going to be any chance of my moving from MT to WP, this HAS to work. Right now, it doesn't.

  21. baroncelli
    Member
    Posted 8 years ago #

    Same exact problem as the two persons before...

  22. LiquidSpeed
    Member
    Posted 8 years ago #

    Same problem... plz help us?

  23. buKit
    Member
    Posted 8 years ago #

    I am having an altogehter different problem than you guys.

    When I run the import in 2.0 I get a 'database error' and a bunch of code I don't understand.

    Something is happening to my database as each time I've tried running it, when I check my admin it says I have one more post in 'uncategorized' than I did the previous time, but I have no posts in that category. All the posts I'm trying to import are in that category - there's about 1500, but it seems the whole lump of them are regsitering as one post in my new blog and I can't see them anywhere other than the 'manage categories' screen.

    I'm going to keep scouring the forum here as I have been for a few days, but thought I'd put this up here in case anyone knows what's up.

  24. LiquidSpeed
    Member
    Posted 8 years ago #

    For the problem that dlature and I were having, I found that I could edit the mt.php file and type in what the correct address should be with the /'s included... I'll show the changes using dlature's problem:

    c:myhostaccountdlaturewp/wp-content/uploads/2006/01/012906movable_theoblogical_6.txt

    changes to

    c:/myhostaccount/dlaturewp/wp-content/uploads/2006/01/012906movable_theoblogical_6.txt

    and that should be that.

  25. dlature
    Member
    Posted 8 years ago #

    Where in that file did you do that? I'm not sure what variable represents what, or at least it is eluding me for the moment.

  26. LiquidSpeed
    Member
    Posted 8 years ago #

    Under "function get_entries()" This is what I changed "$importdata = file..." to :

    $importdata = file("c:/Domains/joblog.co.za/wwwroot/wp-content/uploads/2006/02/import.txt");

    I don't know if everything will look ok when I post this but I hope you get the just... it is line 78 of mt.php.

  27. dlature
    Member
    Posted 8 years ago #

    Not having much luck. I wish WordPress folks would fix this and make it work with the supplied form.

  28. LiquidSpeed
    Member
    Posted 8 years ago #

    Really? What error are you getting now?

  29. dlature
    Member
    Posted 8 years ago #

    OK......tried it...and it worked (the fix from Liquid Speed)

    I still want to know when WordPress is going to fix it so I can use the form to upload the import.

    Thanks for the help, LS!

  30. localcelebrity
    Member
    Posted 8 years ago #

    i'm confused... instead of taking the file from our desktop using the form, you're putting in a direct path?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags