Mistake Effect

A couple nights ago I did some maintenance here on muddylaces. I fixed a mistake I made a long, long time ago. When I first created this drupal site the first account I created was for gfox. I hadn’t read the best practices guide, so I didn’t understand that this was a bad thing.

Changing this in the database proved daunting and fraught with danger. While I was reading the Using Drupal book I discovered the views bulk operations module.

This module provided the ability to change the owner of a node. A light bulb went off and I quickly realized what needed to be done.

I set up a view to see all nodes (content) on my site. I then configured the view to allow bulk editing, and chose the “Change the author of a post (node_assign_owner_action)” operation. I tested this a bunch before enabling this view. The main issue I found was that I couldn’t target content for a specific userid. Instead I targeted content for the currently logged in user.

I then created a new_gfox account, and then when I was logged in as my first account started using the view to assign the content to my new account. A few minutes later I was done.

It was pretty easy to do this once I had the missing piece of the Views Bulk Operations. After the assigning was all done I renamed my first account, then renamed my new account.

The only unfortunate side effect was that the notification or subscription module went berserk with all the changes and sent out a ton of email to people who were subscribed. Woops, should have disabled that for a few minutes.