WordPress.org

Ready to get started?Download WordPress

Forums

Imported MT Entries Wacky (25 posts)

  1. Jim
    Member
    Posted 10 years ago #

    Some of my imported MT entries contain extra line breaks. Is there a quick and easy way of removing them? I don't want to have to edit each entry by hand.

  2. carthik
    Member
    Posted 10 years ago #

    I tried some archives on your blog, but could not find any entries with the said problem.
    Can you provide us with a post with this problem, as an example?

  3. Jim
    Member
    Posted 10 years ago #

    http://www.jimlynch.com/blog/index.php?p=346
    Try that one. There are a lot more on too. Somehow extra line breaks got stuck in and now it's breaking a lot of links and graphics. And screwing up some entries.

  4. carthik
    Member
    Posted 10 years ago #

    My first guess is that it could be a problem with the import.txt that you got when you exported the MT entries. Maybe the text editor you used to save the entries added the extra linebreaks in.
    An empty line in import.txt is interpreted by WP as a new paragraph. When the content is rendered, the autop filter, among others takes care of formatting. autop interprets an empty line as a paragraph, andintroduces the line breaks. Could you, by any chance provide me with the portion of the mt export file that had the post that you just linked to? I am sorry if this is a bother for you, but that sure will clarify a few things.

  5. Jim
    Member
    Posted 10 years ago #

    Sure, here it is:
    --------
    AUTHOR: Jim
    TITLE: Timothy Treadwell: Bear "Expert" Devoured By Bears
    STATUS: Publish
    ALLOW COMMENTS: 1
    CONVERT BREAKS: 0
    ALLOW PINGS: 1
    PRIMARY CATEGORY: Animals & Wildlife News
    CATEGORY: Animals & Wildlife News
    DATE: 10/09/2003 12:25:53 AM
    -----
    BODY:
    Sometimes people do things so incredibly inane and
    stupid
    that it makes me wonder how our species has survived on this planet for
    so
    long. I remember seeing Treadwell's "Grizzly Diaries" on TV and
    thinking to myself that he was eventually going to get taken by one of
    the
    bears he got so close to. And that's exactly what happened.
    We now have
    two
    dead human beings and two dead bears
    . And for what? Nothing except
    the
    self-promoting vanity and self-deceiving delusions of a man who
    apparently had nothing better to do
    with his
    life than harass wild animals that really wanted nothing more than to
    be left
    alone.
    -----
    EXTENDED BODY:
    There's more to this story, unfortunately, though. Treadwell's death is
    indicative of two dangerous trends. The first is the tendency of stars
    of
    nature documentaries and television programs to try to get as close as
    physically possible to dangerous animals and the second is the
    anthropomorphization
    of wild animals by animal rights advocates. <br>
    <br>
    Steve Irwin (the Crocodile Hunter) was probably the first TV show host
    to get
    recklessly close to dangerous animals and there's been a succession of
    other
    animal TV shows that have followed in his footsteps (Jeff Corwin,
    O'Shea,
    etc.). While the audience might find what these guys do entertaining,
    they set
    a very dangerous example for their viewers (especially the young and
    impressionable ones). <br>
    <img
    border="0" src="http://www.jimlynch.com/images/treadwell.jpg">
    <br>
    <span style="font-style: italic;">Treadwell: Reckless, dangerous and
    now dead.</span><br>
    <p class="MsoNormal">Timothy Treadwell was certainly one of the more
    foolhardy of this breed
    of nature
    documentary star but I doubt he will be the last. Even some scientist
    types
    have started imitating these guys by trying to get close to dangerous
    animals.  Remember the idiot that had
    href="http://www.jimlynch.com/blog/archives/000020.html">his calf
    ripped off by
    a bull shark
    ? He was playing the same game as Treadwell, Irwin and
    the rest
    - using animals as props to attain media attention and funding. His
    gambit with
    the bull sharks nearly cost him his life, he almost bled to death after
    his
    calf was bitten off by the shark.<br>
    <br>
    If you watch Treadwell's shows you will notice him saying "I love
    you" and making other inane remarks as he gets close to wild bears
    (MSNBC.com has a report with
    href="http://www.msnbc.com/m/mw/mw.asp?t=V&id=nn_morrison_bear_031008&sk=&pl=&name=cov%20er&opt=0">video
    footage of Treadwell in action
    ).
    It's
    simultaneously nauseating and mind-blowing to see a human being with so
    little
    regard for his own life and so little respect for the animals he claims
    to
    love. It's as though he's lost in some kind of fantasy world where he's
    "special" and "different" from the rest of us and thus able
    to walk among wild animals without worry of being attacked. <br>
    <br>
    He comes across as
    totally
    out to lunch about the *reality* of what he's doing and where he is.
    Even his photos
    contain cutesy names for the bears such as "Holly Bear" or
    "Taffy Bear." One can't help but wonder what went wrong in
    Treadwell's life that could produce such an infantile perception of
    dangerous
    predators. Or perhaps it's just more evidence of the "Disney-ification"
    of our society. We seem to have become so cut off from nature that some
    of us
    have lost all sense of reality.
    <img alt=""
    title="" src="http://www.jimlynch.com/images/treadwellbearphoto.jpg"
    style="border: 0px solid ; width: 240px; height: 360px;">
    <br>
    <span style="font-style: italic;">Does this look like a predator that
    should be named "Winston Cubby Bear" to you?</span><br>
    <p class="MsoNormal">The tendency to treat animals as if they are
    humans is demeaning and
    dangerous
    to both species. It has the potential to condition foolish human beings
    to risk
    their lives and the lives of others in futile attempts at being
    accepted into
    "animal society" and it takes away from the natural respect due to
    all large predatory animals. Wild bears are not humans with fur. They
    will never
    "know" us nor will they ever "like" us. They are not
    created for that and they do not have the capacity to learn to be
    civilized or
    to interact on the level of a human being. We can and should admire
    them but only from a respectful distance. We should never intrude into
    their physical space. If we do so, we do so at our peril and also at
    theirs. <br>
    <p class="MsoNormal">It's utterly absurd that I even had to write those
    last few sentences
    but there
    are people out there who can't seem to accept the reality of wild
    predators. And reality is the key word here, folks. Some of us just
    don't seem
    to live in it sometimes. Timothy Treadwell was a man who tried to
    ignore the
    reality of what wild bears are and that decision ultimately cost him
    and his
    girlfriend their lives. <br>
    <br>
    As
    href="http://story.news.yahoo.com/news?tmpl=story&u=/ap/20031009/ap_on_re_us/bear_attack_5">more
    details of the attack
    are released via an audiotape that was
    recovered from
    the camp site, we see that Treadwell finally and horribly came face to
    face
    with the reality of what a wild bear is. Let's just hope that his
    fellow TV
    adventurers and the general public learn something from these needless
    deaths.
    The irony here is that Treadwell's foolishness didn't just cost his own
    life;
    it also cost the lives of two of the bears he claimed to love.

  6. Jim
    Member
    Posted 10 years ago #

    Note that I used Mozilla to save the text file.

  7. carthik
    Member
    Posted 10 years ago #

    Jim,
    There is something wrong with the text editor you used to save/edit the file, if you used one.
    If you used Mozilla's (or any other browser's) "save file as" feature, then it's either a problem with MT, or the browser that caused the text to have all these extra linebreaks.
    By looking at what you have posted above, I can see that there are unneccesary linebreaks in the file, and WP treated them as such. So it is not the import-mt.php's fault.
    Now, the best option when exporting the entries from MT, is to let it export to a Moz Browser, and then copy (select all) and paste into wordpad, and save it as a txt file. Notepad sometimes bungles up line breaks, though not all the time.
    Can you please try the export again, this time taking care to see if this post still display the way it has, above? If it still behaves/display the way it is above, then it is a problem related to the MT exporter.
    I understand your frustration. Please do not think that I am trying to say it is not wordpress' fault in an unreasonable way :)

  8. Jim
    Member
    Posted 10 years ago #

    Oh no, don't worry. I'm not blaming WP. I'm not mad or anything. So no worries there. :-)
    Let me try the export again.

  9. Jim
    Member
    Posted 10 years ago #

    You know I think the stupid export thing in MT is screwed up. No matter which browser I use to do it I still have those weird line breask.
    Is there a way to just strip them out of the import.txt file?

  10. carthik
    Member
    Posted 10 years ago #

    You will have to strip all the linebreaks out and then you will have a pudding of sentences, which won't make sense.
    Can you identify any particular characteristic of the posts that show this behavior that might be causing this?
    I never heard of anyone having this problem is why I am curious enough to see the reason :)

  11. Jim
    Member
    Posted 10 years ago #

    I don't know. One thing that might be relevant is that I used Mozilla's Composer to create most of these posts. Perhaps that has something to do with it?

  12. Jim
    Member
    Posted 10 years ago #

    This is very odd. I don't know what to do about it. When I do the export from MT, that is what I get. I tried it with IE and Firefox and still got the same situation.
    Darn. I have about five hundred entries. Too many to fix by hand. :(

  13. carthik
    Member
    Posted 10 years ago #

    Then most of the posts must be broken the same way.
    Besides, if MT displayed these posts correctly
    a. There must have been a problem with MT ignoring line breaks!
    or
    b. MT screwing up by putting linebreaks only when exporting the posts.
    You could search the MT support forums for an answer. :)

  14. Jim
    Member
    Posted 10 years ago #

    I'll check that out, thanks. Thank you for trying to help.

  15. carthik
    Member
    Posted 10 years ago #

    My pleasure! Please do let me know what turned up, if it's not too much of a bother.
    mail at carthik dot net is the address.

  16. Fahim
    Member
    Posted 10 years ago #

    Saw this post and thought I'd help you and help myself at the same time :p I've written a new script to import from MT to WP that does not use the export feature. Instead, it imports directly from the database. If you use mySQL in your MT install, then the script would work for you. I've already used it to import my MT install to WP and it worked fine for me. I'd like to see if it would work for you since if it doesn't, I'd like to improve the script to the point where it does work for you. You can get the script from http://www.farook.org/mt2wp.phps

  17. Jim
    Member
    Posted 10 years ago #

    Thanks. How do I execute this script?

  18. Jim
    Member
    Posted 10 years ago #

    Okay, got it to run. Got an error though:
    Invalid query: insert command denied to user: 'jimlynch_jim@localhost' for table 'wp_users'
    SQL : INSERT INTO wp_users (user_login,user_pass,user_firstname,user_lastname,user_nickname,user_icq,user_email,user_url,user_ip,user_domain,user_browser,dateYMDhour,user_level,user_aim,user_msn,user_yim,user_idmode) VALUES ('Jim','1a1dc91c907325c69271ddf0c944bc72','Jim','','Jim','','jim@jimlynch.com','www.jimlynch.com','','','','','1','','','','');

  19. Jim
    Member
    Posted 10 years ago #

    Okay, I blew away the database and reinstalled. That took care of the error above.
    But I got this one when it started importing:
    Invalid query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '88tbirdgirl@yahoo.com','','140.146.234.149','2004-05-03 01:24:0
    SQL : INSERT INTO wp_comments (comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_author_IP,comment_date,comment_content,comment_karma) VALUES ('20','rockin\'88tbirdgirl','rockin'88tbirdgirl@yahoo.com','','140.146.234.149','2004-05-03 01:24:07','I think this site is spectacular, and it brings into focus, once again, something a lot of people have forgotten about: September the 11th, 2001. I will never forget where I was or what I was doing whan I found out the World Trade Center had been hit by terrorists. People have a tendency to forget; out of sight, out of mind. Every month on the 11th on the large dry-erase board where I work, I write, \"REMEMBER!\" in the hopes that it will wake people out of their little daydream that they are safe in the world. Most people get it, and some people just think I am odd. Apparently, September the 11th, was not very important to them as it was to me. I feel sometimes that I am the only person that still thinks of September the 11th with horror and deep, desparaging sadness. I cannot be the only one, obviously, by the number of posts I have read here, although it FEELS like it. I feel physically ill, when I think about all of the people that had to make the gruesome choice of being either burnt to death or to jump out of the buildings and commit suicide.The 911 calls that were made and were not responded to because rescuers could not get to their location, is equally sickening to me. Is there anyone from the mid-west that feels as I do? Just curious...Well, I just wanted to say that I have not forgotten this horrible act of terrorism against the United States or how many people died nor will I ever. I am thinking of all the people around the world that lost a loved one in the terrorist attacks! God Bless You All!','0');

  20. Jim
    Member
    Posted 10 years ago #

    Well this is interesting. Some of the entries did get imported but still with the line breaks! So it's not MT's export that's the problem. I see the exact same thing.
    I doubt it's WP's problem either. Could it be the way Mozilla's Composer handles links and HTML? That's what I used for the most part for all of these entries. Does it have some kind of formatting problem or something?

  21. Jim
    Member
    Posted 10 years ago #

    At this point, I've decided to use a Word macro to just clean up the important entries. That should make it fairly quick.

  22. carthik
    Member
    Posted 10 years ago #

    Jim, it seems the entries are screwed up the way they are stored in the MT database, for whatever reason.
    What amazes me is how your MT installation managed to remove those breaks while displaying those entries. (In other words, if the entries had breaks in them, MT should have displayed those)
    Hope you find that the latest solution works.

  23. Jim
    Member
    Posted 10 years ago #

    Thank you both very much, I appreciate the help.
    But it's too late. I killed the MT database earlier this evening. I fixed the most important entries with the Word macro and will either prune out the nonimportant ones by deleting them or will fix the rest slowly over time.
    But thank you both very much. I really did appreciate the effort to help out with this.
    Despite the minor line break burp, I'm really digging WP. It's got quite a lot of what I wanted from MT. And boy do I love the little smilie hack. :)

  24. Anonymous
    Unregistered
    Posted 10 years ago #

    replace
    <?php the_content(); ?>
    with
    <?php
    $postdata = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID = '$id'");
    echo $postdata->post_content;
    ?>

  25. Ruby Sinreich
    Member
    Posted 9 years ago #

    Hey thanks for writing this import tool. I have been havign trouble with my athors coming out in the wrong places. I removed all my (many) failed imported posts and ran your script. I got the following error:
    Importing User records ...
    Invalid query: Table 'opwp.wp_users' doesn't exist
    SQL : INSERT INTO
    wp_users (user_login,user_pass,user_firstname,user_lastname,user_nickname,user_icq,user_email,user_url,user_ip,user_domain,user_browser,dateYMDhour,user_level,user_aim,user_msn,user_yim,user_idmode) VALUES ('rubyji','1a1dc91c907325c69271ddf0c944bc72','rubyji','','rubyji','','editor@orangepolitics.org','http://lotusmedia.org/blog/','','','','','1','','','','');'
    What does this mean?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.