Recent Topics

SQL error when importing MT to b2evo

started by on 2004 Jun 19 – Last touched: 2004 Jun 19

2004 Jun 19 17:19    

When I try to import posts from MT, I get this error:

Category DATE: 04/01/2004 03:14:21 PM ----- BODY: \par (for blog #2) will be created with first post.

1. Processing post

Unknown key []:

Unknown key [{\*\generator Msftedit;}\viewkind4\uc1\pard\f0\fs20 AUTHOR]: Cari TITLE: a new start? STATUS: Publish ALLOW COMMENTS: 1 CONVERT BREAKS: __default__ ALLOW PINGS: PRIMARY CATEGORY: DATE: 05/28/2003 12:10:37 PM ----- BODY: Ok, this is a test. Just trying out Moveable Type. ----- EXTENDED BODY: ----- EXCERPT: ----- KEYWORDS: -----

MySQL error!

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 ' 'pingsdone', 0, '', (Errno=1064)

Your query:
INSERT INTO evo_posts( post_author, post_title, post_urltitle, post_content, post_issue_date, post_mod_date, post_category, post_status, post_locale, post_url, post_autobr, post_flags, post_wordcount, post_comments, post_renderers ) VALUES( 3, '', 'title', '', '', '2004-06-19 08:10:05', 1, '', 'en-US', '', , 'pingsdone', 0, '', 'b2WPAutP.b2evGMco.b2evALnk' )

I don't know if anyone can help me, but any suggestions would be appreciated. Thanks!

2004 Jun 24 00:47


It looks like this post does not have a category. Not being the MT whiz in the house, I'm not sure what else to tell you, but that might be a clue.

Anyone else know anything about this?

2004 Jun 24 17:31

Azel, which version of the script are you using?

If you're not using the one from Oslo (release then try this please and if this does not help, drop me a PM and we debug this.

2004 Jun 25 05:33

I was using the latest version of the script. I just messed with the export text file and I figured out that my very first post had no variable next to it like all the others did (zero). I must have later changed some settings in MT to disallow pings. So I added a zero next to Allow Pings on the first entry and it worked!

I am so sorry for posting what now seems to be a silly question. Thank you guys. ^_^

2004 Jun 25 10:14

There are no silly questions, you know?! :)

And to be honest: the script should not fail like this, even if the export file is messed up. Therefor I'd really be interested in the first two entries like you had them in the export file (or was it really just the missing zero?)..

2004 Jun 26 00:15

The export file didn't have a zero next to my first entry both times I exported a new file. I'm sure that using Wordpad instead of Notepad had a lot to do with it as well, since the spacing was not correct. ;/

2004 Jun 26 05:09

@isaac: a missing category is no problem

The same for the missing ALLOW PINGS value.

Looking at the code and the script's output you've put in the first posting it seems there are newlines missing.

The MySQL error happened because $post_convert_breaks was not set and therefor the function that creates the post seems to have putten false into the query (which means "empty" for an string).

But the crazy category name etc seems to be caused by non-existent new lines in between.. though I'm not really sure, of course.

Might PM you tomorrow, azel.. :)

btw: what were you doing with Wordpad/Notepad? Search & Replace sth?

2004 Jun 26 16:19

Whenever I copied my export file, I used Microsoft Word (not Wordpad, what was I thinking?!). Then when I'd upload the file, I'd change it from export.rtf to export.txt. So I just tried something different by copying the export file to Notepad.

I still don't understand why there was no variable next to Allow Pings. But then I'm not very php/SQL oriented. ;P

Thanks for trying to help me figure all this out though. Everyone is so nice here. ;D

2004 Jun 26 21:26

You should not use Word as a texteditor. And changing the extension from .RTF to .TXT does not make it a plain text file.

2004 Jun 26 22:16

Everyone is so nice here.

Thanks, azel :) I like to think that's one thing that sets b2evolution apart from a lot of other opensource apps.

2004 Jun 26 22:59

isaac wrote:

Everyone is so nice here.

Thanks, azel :) I like to think that's one thing that sets b2evolution apart from a lot of other opensource apps.

"Life is good". (I wanna make this a tagline for b2evo :)))

Form is loading...

multi-blog – This forum is powered by b2evolution CMS, a complete engine for your website.