Help - Search - Members - Calendar
Full Version: MT 2.64 import bug - READ ALL
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
EvandroMAC
Hi all,

I found a bug on the MT 2.64 import mechanism. I don't know if this bug exists in older versions.

If you use hifens ("-"), for some reason, in any of your posts, and some nice day you decide to export your posts to re-import on other MT installation, the MT import system will be scrambled because the use of the hifens.

In my case, I used the hifens like this in several posts:

TOPIC 1:
-----------------------------

TOPIC 2:
------------------------------

Etc.

So, if you are receiving "Use an unitialized value" or other crazy errors when trying to import your posts from MT, take a look at your posts.

A good way to discover which posts are causing the problema is activate "CREATE NEW AUTHORS" feature. With this activated, the Import system will stop each time it finds an parsing error and will return "author_id can't be null" or something like that.
ovington
Is this true? Just to be clear, it's spelled "hyphens". But I use hyphens in almost every one of my postings. Does this mean if I needed to import a saved export because of a crash or whatever these hyphens would all screw things up?
girlie
The MT Import/Export mechanisms use strings of hyphens to distinguish pieces of text (either 8 or 5 hyphens, followed by a carriage return).

You might look at the Import Format document to understand how these are used.
EvandroMAC
Ok, sorry. I decided to put this in the 2 foruns just to help people who is having problems caused by this issue.

I think this problem is a real bug, cuz if the system cannot detect the differenct between:

------------------------------------------

and

-----

and cause crashes on system... it's a bug.
EvandroMAC
QUOTE (ovington @ Aug 8 2003, 11:50 PM)
Is this true?  Just to be clear, it's spelled "hyphens".  But I use hyphens in almost every one of my postings.  Does this mean if I needed to import a saved export because of a crash or whatever these hyphens would all screw things up?

Yes. Me and other people had the same problems using version 2.64 AND hyphens (5 or more) to separate and organize text in posts.
mcroft
53 hyphens + CR includes 5 hyphens + CR.

Insert a space at the end of yours.

Ideally, the export format could be revamped to be XML, which would give greater transportability, but it's still possible to use the delimiters in messages and screw up the system.

This is a "Doctor it hurts when I go like that" problem.

The answer is "then don't go like that."
EvandroMAC
When people with hundreds of posts, with several dozens of it containing hyphens, I think it would be a very hard procedure :

1. Identify all posts containing hyphens
2. Go to every post, and insert a space at the end of every sequence

The most efficient solution, for me, was alter the code to, instead use hyphens to delimitate posts, trackbacks and comments boundarys, use anything else.

I did that modification in file CMS.pm, to use "}" (which is much more improbable to be used by humans do delimit text than hyphens) and now I can use hyphens without have to worry about insert spaces in any place.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.