Port to 6.x

milliams - February 28, 2008 - 19:00
Project:Wordpress Import
Version:5.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Is there any chance of a 6.x version of this?

Thankyou

#1

yrocq - February 28, 2008 - 23:14

Yes, a port to Drupal 6 is planned. Unfortunately, I am currently very busy. I won't be able to work on this module until mid-march.

#2

rernst - March 7, 2008 - 20:22

That's good to hear. I'm very interested in a 6.x port as I want to convert my wordpress 2.2.x blog over to Drupal 6 fairly soon. As such, I'm willing to throw in some development effort. I'm wondering how much effort it will be. Can't tell that until after I look at the code...

#3

worldinchaos - March 8, 2008 - 21:50

I would appreciate this port as well for the latest version of Wordpress (2.3.3). Either way, try to let me know if I can do anything to help, I don't have lot's of experience coding, I'm learning C# right now, but I use to design websites in PHP (mostly design, a little DB stuff).

Feel free to ask if I can do something, I may not be able to (lack of knowledge) but I will try/let you know.

#4

alphageekboy - March 11, 2008 - 04:13

Didn't see this until I sent my message directly to the Developer. However, I am available to help port this module over to 6.x.

#5

DenRaf - March 13, 2008 - 06:35

http://www.denraf.be/content/wp2drupal-drupal-6-and-wordpress-23

I'll check this evening if there are things that match, cause in wordpress 2.3 there are a few changes in the database.

#6

yrocq - October 5, 2008 - 00:46

wp2drupal and wordpress import are two different projects. The first one directly imports a blog from a Wordpresss database and the second one processes a file in WXR format exported by Wordpress. Wordpress import shouldn't suffer from modifications made to the Wordpress database structure because it uses one more layer of abstraction.

#7

pariviere - March 27, 2008 - 15:42

Hi,

I've attached to my post the following files :

  • wordpress_import-6.1-dev.20080327.tar_.gz : is a version of wordpress_import which is compatible with D6 core
  • 0001-updating-to-D6-core.patch : is the patch against CVS HEAD for adding D6 core support

Note : it is just a dummy port. I did not try extensively the module but for my case it works.

AttachmentSize
wordpress_import-6.1-dev.20080327.tar_.gz5.36 KB
0001-updating-to-D6-core.patch4.24 KB

#8

milliams - April 12, 2008 - 22:44

@ #7

I get:

warning: Invalid argument supplied for foreach() in /var/www/html/drupal/sites/all/modules/wordpress_import/wordpress_import.module on line 216.
The Wordpress blog has been successfully imported

but in fact, it wasn't imported at all. I'm using Wordpress 2.0 and the tar.gz you attached.

#9

tassoman - April 29, 2008 - 22:03

I managed to import WordPress stuff into plain D5 then upgraded to plain D6 with no problems.

#10

Brigadier - September 3, 2008 - 19:32

I did a lot of rework on the module to make it work for my Drupal 6 installation. It's not perfect but it ran well enough to import my blog. I also added a couple features. My Wordpress version was 2.0.x and the export file was done using the plugin from http://technosailor.com/2006/07/05/wordpress-to-wordpress-import/ (slightly tweaked to export only 100 posts per xrss file).

Note that the file upload box is still there but I don't think it works (I created an option for a file already on the server).

What I think works:

  • The 'more' comment splits the post into a teaser and body properly.
  • Option for a file already on the server, named 'files/import.xml'.
  • Some of my pages weren't specified as pages in the XML, so the module tries a second method to detect pages.

What I know doesn't work:

  • file upload (might just be file size but I couldn't get it to work)
  • multipage posts/pages
  • categories seem to come in as tags.
  • urls in wp end in /, in drupal they do not (use the Global Redirect Module http://drupal.org/project/globalredirect to deal with this)
  • xmlsitemap doesn't seem to use the generated aliases, I had some success by turning it off before importing and back on after importing (I let Pathauto generate my urls instead of this module)
  • daily/monthly/yearly archives don't work, I plan to make plain pages to replace these
  • any funny urls like ?p=x-y - Wordpress supports a lot of these and your theme or plugins might've used them
  • I get a warning about 1 post out of every import, it seems to try to add it twice ("user warning: Duplicate entry x...")

I did a lot of testing by looking at urls in xml sitemaps generated by my old Wordpress and my new Drupal 6, I suggest anyone considering this do the same. I'm also going to need to review all my posts one-by-one for any other oddities, but I'm overdue for a good deep audit anyway. Make sure to set the options on pathauto so you get aliases that match your old permalink structure.

I hope this helps, but don't expect magic (backup and test offline until it works).

The attachment is the .module file.

AttachmentSize
wordpress_import.module.txt26.12 KB

#11

milliams - September 9, 2008 - 18:44

It worked for me just fine. I used your .module file and the .info file from #7.

Uploading the .xml file seemed to work just fine though I also manually set the path in the .module file so I can't be sure. I also had to manually change the input filter from 'Wordpress' to 'Full HTML' in order for the posts to look like they should (new lines etc. weren't being parsed).

#12

DamienMcKenna - September 20, 2008 - 04:04

On a related note, I compiled a patch to make the wp2drupal module work with D6.4:
http://www.mc-kenna.com/2008/09/patch-for-wp2drupal-for-drupal-6/

Using the patch I successfully converted the data (nodes + comments) from my WP 2.6.2 installation.

#13

karlcw - October 23, 2008 - 15:00

If you make this work properly I'd be happy to hear how since it's been driving me up the wall for many days now.

 
 

Drupal is a registered trademark of Dries Buytaert.