Importing Content Profile data in Drupal

A short post, illustrating a gotcha I encountered while importing Content Profile user data in Drupal.

Scenario: You’re building an intranet or extranet, and want to load their users into the system. First use the User Import module. To load their Profile data (e.g. company, mobile#), go for the Node Import module. You are aiming to import user data as a node of type “Profile”, associated with the user.

You might encounter this error:

content-profile-import

Here’s the fix, which is one of the eight steps in the Node Import flow:

content-profile-import-fix

“Username” is in your .csv file; it’s the username of the already-imported user. Set that to be the “Authored by” value. You want that person to be the author of the Content Profile, so it’s associated correctly with the user itself.

If it’s not checked, Node Import thinks that you, the admin (uid 1), would be the author. That’s why it complains with the above error.

 

Got Google Wave – Now What?

Thanks to Kipp Watson, I’m part of the google Wave beta.

wave

Now to figure out what to do with it…

This Mashable post seems to be a decent place to start.

UPDATE November 24: 

I have some invites if anyone wants them.

Update 2010: 

I was so indecisive about using Wave, they killed it! I was not alone.

 

Migrating from Movable Type to Drupal

Movable Type was my content management system (CMS) of choice in 2004. Installation and configuration was easy enough for a non-developer like me to handle, and I had a couple of reliable business partners for coding and design projects.

However, the open-source movement captured interest and attention of the development community, and Movable Type began an inexorable slide into comparative irrelevance. (Evidence at Google Trends.)

One of my clients has several Movable Type websites, and this month we’re moving them all to the very solid Drupal platform. All but one of the sites have a manageable amount of copy, making it  feasible to copy and paste the content. The last one had 181 blog posts, which demanded an automated solution.

This post illustrates how I moved the blog content from Movable Type to Drupal.

Three Methods

I found three ways to migrate the content, in decreasing order of elegance:

  • Use the new Feeds module to scrape an RSS file and publish nodes.
  • Use the Import Typepad / MoveableType module, which imports nodes in a batch from an MT export file.
  • Migrate first from Movable Type to WordPress, and then use the WordPress Import module to get the content into Drupal.

I wasn’t sure if Feeds would import the blog’s comments along with the posts, and the two-step option seemed clunky.

Down the Import Typepad / MoveableType path I went, and in the process I learned:

  • The 6.x version doesn’t work. So I installed Drupal 5.x with the 5.x version of the module, and then upgraded to the 6.x branch.
  • The module expects to import into a content type called “blog”. Any other name will prevent you from editing the nodes. For simplicity, I wiped out the other content types from the 5.x install.
  • Set up your Drupal categories in advance. Taxonomy CSV import/export worked for me.
  • Set up your users in advance, since the import module wants to map the Movable Type author to the Drupal author.
  • Tidy your markup tags and oddball ASCII characters in the export file, before you do the import.
  • Also in the export file, change PRIMARY CATEGORY: to CATEGORY:. Honestly, I don’t know if this was necessary but it took less time to do that than to type this sentence.
  • Drupal 5.x is fast, compared to my contrib-laden installs of 6.x.

With all that in place, kick off the import in your 5.x install.

You may be greeted with an “ERROR 1 State = 5″ error code at the top of the review page, and this charming screen after confirming the import:

movable_type_import_error
Yet a visit to the admin/content/node page brings relief:

movable_type_import_success

So the import does work.

Adios, Movable Type.

Three more to go. Goodbye Mediatemple.

helicopterOnly three more sites to migrate before I am free of MediaTemple’s deeply troubled Grid hosting service.

Their customer service is fine, but their phone system fails more often than the Detroit Lions, and the server outages come too frequently and occasionally for days at a time. Here’s their status feed.

The last straw was when a few of my pro bono sites got hacked with a code injection, via what was probably a systemwide vulnerability. Many others were affected.

I had seen this kind of attack at another host, and that time had the opportunity of breaking the news to the sysadmin.

For the record, most of my sites are now at Chicago-based WiredTree. They have a nice VPS package and answer tickets promptly.  And they sent me a coffee mug after I tweeted a haiku:

a ticket opened

michael fixes dns

a ticket closed

 

UPDATE November 25, 2009: 

MediaTemple has sort of fessed up, with this email:

Recently we witnessed some malicious activity on our (gs) Grid-Service platform where a hacker redirected some customer websites to a 3rd-party advertising website. This attacker appears to have illegally obtained some older customer data, which included usernames and passwords stored in clear text.  Our newer systems now have this same data encrypted. An investigation into this illegal activity is ongoing, with full details forthcoming.

More here.

UPDATE October 2010:

Nearly all my websites are hosted at WiredTree in Chicago. Solid uptime, and the support team answers the phone! I’ve never been as happy with a hosting service.