-
Website
http://technosailor.com -
Original page
http://technosailor.com/2005/11/22/textpattern-to-wordpress-import-script/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
AndyBeard
7 comments · 4 points
-
Rob
12 comments · 101 points
-
GeekMommy
4 comments · 15 points
-
chrisbachmann
5 comments · 1 points
-
chrispian
4 comments · 1 points
-
-
Popular Threads
I am completely new to WP and just do not find where in admin panel is the "import" function....
thanks
Pascal
WordPress database error: [You have an error in your SQL syntax near '"INTERVAL 1 HOURS") AS post_date_gmt, ADDDATE(LastMod, "INTERVAL 1 HOU' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, ADDDATE(Posted, "INTERVAL 1 HOURS") AS post_date_gmt, ADDDATE(LastMod, "INTERVAL 1 HOURS") AS post_modified_gmt FROM txp_textpattern
any idea?
"WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern"
WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern"
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern[/code]
So IF you followed my instructions and by doing so you still are getting an error, then I want to see the modified code.
return $txpdb->get_results('SELECT
ID,
Posted,
AuthorID,
LastMod,
Title,
Body,
Excerpt,
Category1,
Category2,
Status,
Keywords,
url_title,
comments_count,
FROM '.$prefix.'textpattern
', ARRAY_A);
WordPress database error: [You have an error in your SQL syntax near 'FROM txp_textpattern ' at line 15]
SELECT ID, Posted, AuthorID, LastMod, Title, Body, Excerpt, Category1, Category2, Status, Keywords, url_title, comments_count, FROM txp_textpattern
Done! 0 posts imported.
// Get Posts
return $txpdb->get_results('SELECT
ID,
Posted,
AuthorID,
LastMod,
Title,
Body,
Excerpt,
Category1,
Category2,
Status,
Keywords,
url_title, comments_count FROM '.$prefix.'textpattern ', ARRAY_A);
comments_count,
FROM '.$prefix.'textpattern
', ARRAY_A);
where is the truth?
My current URL scheme in textpattern is:
http://[site]/article/[post-id]/[url-title]
I can migrate to WP *and* maintain all the current links to my posts if I can keep the post-id the same during the transition...
1) when I Tried the script with my txp db being different from my wp db, it failed.
2) Is the post_name for the posts in the wpdb copied from the txp db (rather than re-created)? If so, I can probably write a script to update the new wp database with the proper post_id based on the post_name...
Then all I have to do is write a script to convert all the textile formatting in the wpdb and I think I'm done!
Thanks for your work on the import script!!
post_name is a direct copy of urltitle. I should have, in hindsight, ran TXP's $Title through sanitize_title() but I did not. Theoretically they should be the same thing but I still prefer the safety of the WP API.
http://www.huddledmasses.org/2004/04/19/wordpre...
As for Textile-- thanks for the pointer. I am aware of the plugin, but I want to stop using it for various reasons, and if I turn it off in WP, then of course all my textile posts will look horrible. Ideally a plugin would let me select which formatting engine to use when (of course, ideally WP would store posts in both original and translated form as TXP does :), but since I haven't found a good WP 2.0 solution for that...
WordPress database error: [Table 'future_futurosity.wp_options' doesn't exist]
SELECT option_value FROM wp_options WHERE option_name = 'tpre' LIMIT 1
Importing Categories...
WordPress database error: [Table 'future_futurosity.wp_categories' doesn't exist]
SELECT cat_ID FROM wp_categories WHERE category_nicename = 'textpattern'
Etc. (it keeps going, and I get similar errors on every page—users, posts, etc.).
Any help would be greatly appreciated!
I'm not aware of any database changes that came between TXP 4.01 (which is what I referenced when building the importer) and 4.03, but maybe you know of some as a TXP user.
Am I supposed to import my Textpattern tables into the WP database before importing? Seems odd, but I thought I saw a comment regarding that above.
I am presuming you have actually installed WordPress succesfully before attempting to import?
I also presume your WordPress table prefix is wp_?
The only thing I can think of is that the first page of the importer prompts you for your Textpattern database info and you might have thought it wanted your WP info.
It seems that there are some issues with UTF-8 characters, like ă, î, ş, ţ and â.
What needs to be changed so I can see the proper characters instead of "?"?
WordPress database error: [Table 'textpattern.wp_bb_1_categories' doesn't exist]
SELECT cat_ID FROM wp_bb_1_categories WHERE category_nicename = 'misc'
WordPress database error: [Table 'textpattern.wp_bb_1_categories' doesn't exist]
SELECT cat_ID FROM wp_bb_1_categories WHERE category_nicename = 'food-dining'
Wherein "textpattern" IS the db name I entered on the previous page for my textpattern, and wp_bb_1 is the proper table prefix for this WP install.
Does this mean the first step of your script is to create WP-style tables in my TXP db and map over the data, THEN export it to the WP database? Or is it somehow writing to the wrong one? Or do am I completely lost and should stop while I'm behind? :)
ANyway- I'm going to try the "import tables into WP database" method for now and see how that works...
Thanks...
When attempting to import textpattern posts to wordpress I get the following error:
WordPress database 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 '/txp_category WHERE type = "article"' at line 5]
SELECT id, name, title FROM /txp_category WHERE type = "article"
No Categories to Import!
Can you point me in the right direction to correct this? I don't know anything about importing tables,etc. Any help is appreciated. Thanks.
I've done the import without any drama. And I've installed the textile for wordpress plugin, again without any drama.
However, I use the following to produce a thumbnailed image that can be clicked to produce a full sized image in a new window:
Now, this doesn't work after import, and it's a bit of showstopper. Any help?