Setting up Drupal multisites under Passenger, with Git

Here’s my steps for setting up a Drupal production and development site, with Drupal core and modules under separate Git control and running the whole thing under Passenger. I got most of this framework from Version Control Blog, but instead of using separate repositories for Drupal core and modules, I use branches. In addition, I include the details of my Passenger setup.

One thing I really like about how Version Control Blog illustrates this process, is setting up the project with an older version of Drupal and then upgrading at the end, to show how simple it is. I will definitely follow that path.
(more…)

Import from Movable Type to Drupal

It seems like they’re been some problems along the way with the Import Typepad / MoveableType module and Drupal 6. I had no problems with it though. I followed some, but not all of Andrew Benkard’s suggestions. Removing PRIMARY CATEGORY wasn’t necessary. I loved how the user names don’t need to match from Movable Type to Drupal–there’s a great gui for matching up the user names in Movable Type to the user names in Drupal. This module is a huge help to me.

Theme Developer toasts drag-n-drop in Manage Fields

My Manage Fields page within Drupal Content Management lost drag and drop-ability, which turned out to because of this javascript error:

‘$(‘.indentation’, testCell).get(1)’ [undefined] is not an object.

Turning off the Theme Developer module fixed it!

Viewing multiple domains hosted via vhost on other computers

I followed this excellent screencast on setting up Phusion Passenger and all was running well. I can now develop multiple Rails apps simultaneously without starting/stopping my WebBrick server, which I love. But how to view these apps from my networked PC’s? All it took was an entry in the hosts file, which is here by default on both XP and Vista:

%SystemRoot%\system32\drivers\etc\

Thanks, Wikipedia! Now, on both my development machine and my others, I can use addresses like app.local to see work in progress.

One additional point: in your Rails apps, puts will write to your Apache error log, which may be located here: /var/log/apache2/error_log.

Open prototip on page load

I needed a prototip to open automatically on page load.  $(<id>).prototip.show() should do that, but it just wasn’t working.  Nick Stankenburg over on his Prototip forum gave me some ideas, but nothing worked until I set the prototip to open on a very short delay:

if(window.location.hash == '#vote-now') {
document.observe('dom:loaded', function() {
setTimeout("$('left-vote-button').prototip.show()",100);
});
}