Leland

Import not working...

Vote 0 Votes

Is there a reason why this format:

TITLE: PRIDE Nostalgia: Fedor Emelianenko AUTHOR: Leland Roling DATE: 1/9/2009 9:44:00 PM

CATEGORY: Fedor Emelianenko

BODY:

A lot of fans really get angry about PRIDE vs. UFC talk, and it has drawn a line in the fanbase at times… but looking back at some of the great battles from PRIDE when these guys were all younger, brings back some great memories.


Wouldn’t import?

I am simply trying to import a .txt file, and it’s just saying it’s importing, then it’s done, and nothing is in my dashboard whatsoever. What am I missing?

Reported on Movable Type 4.2

15 Replies

| Add a Reply
  • TITLE: PRIDE Nostalgia: Fedor Emelianenko

    AUTHOR: Leland Roling

    DATE: 1/9/2009 9:44:00 PM

    CATEGORY: Fedor Emelianenko

    -----

    BODY:

    A lot of fans really get angry about PRIDE vs. UFC talk, and it has drawn a line in the fanbase at times... but looking back at some of the great battles from PRIDE when these guys were all younger, brings back some great memories.

    -----

    --------

    Here's what it actually looks like, Editor ate it up.

  • It's gotta be an encoding issue. I just imported this one too into sockfish (development branch of the next version of Movable Type). Try this: http://www.codemonkeyramblings.com/sockfish/import/test2.txt

  • Thanks a lot for sticking with my pains, Mike.

    That test2.txt actually worked. So, my question is as to what I should be encoding? All of the text in the file? And what should I be encoding this to, Unicode?

  • It may also be a matter of end-of-line characters. Windows does not terminate lines the same way that Unix systems do. It's very common for people to have to run Windows text files through "dos2unix" on a Unix machine to make it really readable on Unix.

  • Mike, I'm not trying to make it readable on Unix. I'm running MT on my localhost, IIS 7, Vista.

  • That doesn't mean that Perl isn't assuming that formatting. Compare your file to mine, and make sure that your file follows the same rules as mine since it seemed to work for you.

  • When I get home this evening, I will actually type up the same file in Notepad, and see what happens. If that's the case, it's definitely an encoding issue of some sort.

    When I open the test file on Windows, Notepad just runs all the lines together, yet it still works. This is rather frustrating...

  • Lemme ask this...

    The line terminator, I simply "AppendLine" in my .NET application, so I'm assuming that this likely isn't doing to correct termination.

    I should be using \n but in my code, it'll write that literally to the file, so I'll have -----\n actually written in the file if I do so. I'm assuming I need to do some sort of encoding for the writer to recognize \n and break the line?

  • I've only done some hobby work in .NET, but the StreamWriters should have something that lets you do this:

    stream.Write("{1}\n", lineString);

  • I'll try that, but I've also been looking at the Environment Namespace and there is a way to add Carriage Returns to lines, so I'll try that as well.

  • Mike,

    I was able to add Carriage Returns to the end of my lines, no difference. What I did do however was take your copies of your test files and simply copy and paste them to a new file, and then they suddenly didn't work, making me believe this is once again an Encoding problem.

    What am I supposed to be encoding this as? Notepad seems to be bad idea in opening a file, then saving it.

  • Also, Mike...

    From what I read, there cannot be any HTML tags or anything in the BODY? Is that true? So if I'm importing any formatting for my content, basically, it's stripped away?

  • Mike, I need an answer to my HTML tag question... but...

    I GOT IT!

    Your suggestion about putting it into UNIX format worked.

    Notepad++ has an option in a dropdown menu to Convert to UNIX format, once I did that, worked perfectly.

  • That should work. MT generates my exports with HTML in them because there are plenty of cases where I put my own HTML in there for things like Paypal forms.

  • Thanks for all your help.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

137 479

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

238 797

Last Topic: Manifest Schema Compatibility Issue When Restoring Blog by Matt on Oct 17, 2012

1858 6594

Last Topic: Categories and Basename Publishing Issues by e21media on Oct 25, 2012

88 307

Last Topic: absolute publish date in Manage Entries screen by .mau. on Apr 18, 2012

1488 5347

Last Topic: Anti-cloning by .mau. on Oct 29, 2012

732 3093

Last Topic: Blog moved server - now users cannot access blog? by mowgs on Oct 30, 2012

89 317

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

183 771

Last Topic: Commenting with TypePad by Rob Ferrara on Oct 17, 2012

212 680

Last Topic: Does MT-Approval work in MT5? by DLpres on Sep 25, 2012

27 100

Last Topic: Upgrading MT by Caio on Oct 15, 2012

49 224

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 248

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012