Drupal Redesign: Domain Access vs. Multisite

This post is part of a series about our implementation of Drupal during the redesign of www.museumofplay.org and the launch of the Strong.
Read the first post here.

One of the first problems I encountered while working on the Strong websites was how to connect the websites together using Drupal. Domain Access module and Multisite installations are two different approaches. Here's my own struggle with this choice, and why I eventually went with a Multisite installation.

There are six distinct sites that share common features. I used subdomains in development, but we eventually settled on the following six domains:

  • thestrong.org
  • museumofplay.org
  • icheg.org
  • toyhalloffame.org
  • libraryandarchivesofplay.org
  • journalofplay.org

At first glance, the Domain Access module looked very promising. I began implementing it for our sites, but after some struggling, I decided it wouldn't work for us, and switched to a Multisite installation.

Here's why:

1. We like things different

I should point out that our Drupal site was not going to be like most other typical Drupal installations. For example:

  • Our site is primarily content-driven, with a rigid hierarchy of copy-edited pages
  • There are no registered users except for administrators
  • Comments are universally disallowed
  • Homepages are heavily customized
  • There is not a lot of "news" or fluid content, except for the Press Room

The Domain Access module is geared towards a more community-distributed content authoring sort of website, which we are not. That may have factored in.

2. Too many menus

What are the primary links? To get around this, I created 6 Primary Links menus for the 6 websites. And with over 150 pages for all the sites, the combination creates a looooong and difficult administration for menus. It's so hard to know which menu you're in, since it's all crammed together in the drop-down list.

multiple menus

I also was looking to use the Node Hierarchy module to build the site structure. This created yet another convoluted menu:

Node Hierarchy menu

Tedious.

3. Namespace collisions

The sites have lots of content that is named in parallel. For example, several sites have an "About" page, a "Things to See & Do" page, a "Collections" page, and a "Research" page. As content development progressed, this naming actually became more and more parallel. This caused two problems.

  1. Crazy confusing content administration
    Granted, Domain Access does have its own admin listings that separate out each domain's content. Which is fortunate, because the default Content administration page becomes nearly unusable. Something like this happens:
    Which About??
    Which brings me to my next point.
  2. Depressing Pathauto aliases
    My preferred way of generating path aliases was to use Node Hierarchy's tokens, which use the node title. I wanted (and, you could say, "needed") neat and pretty URLs for the site sections. In fact, my themes used the site sections to control colors and tabs. So I wanted URLs like /about-us, /see-do, /collections, /see-do/exhibits, etc.The problem is that Pathauto requires unique aliases. So, if I created www.museumofplay.org/about first, my attempt to create www.icheg.org/about would in fact create www.icheg.org/about-0. Then all the lower level pages in that section would have that ugly 0, like www.icheg.org/about-0/faq.You'll find, actually, that in the example site for Row Eleven Wines, posted as a case study for Domain Access, they got around this by inserting the Domain name into the path. So the About page on the Row Eleven Wines parent site is http://www.rowelevenwines.com/about; the About page for Pinot Noir is http://www.roweleven.com/pinot-noir/about; and, for Stratton Lummis, it is http://www.strattonlummis.com/stratton-lummis/about. This solution wasn't going to work for me.In my attempts to get around this limitation, I went so far as to start writing some mod_rewrite madness that would remove a site id from the beginning of the path. So, www.museumofplay.org/about would redirect you to www.museumofplay.org/1/about, www.icheg.org/about would send you to www.icheg.org/2/about, and so on. But I quickly learned that this was a flawed solution, caused all kinds of problems (paths for the lower level pages were becoming www.icheg.org/0/0/about/faq), and created a house of cards.

4. The house of cards

The paths were the last straw. With 6 big, complex websites being developed, stability became an important factor. All the workarounds I was exploring to meet my requirements were hack-ish solutions, and would have become this monstrous "house of cards", wherein one small change or bump would break ALL the sites. At least with 6 separate websites, if one goes down, 5 are still up, and that's 83% (approximately).

So, I changed my approach and went to a single code base, Multisite installation.

The Multisite Installation

I thought I'd talk here a little bit about what parts of the sites are shared, which led me to the Domain Access module in the first place, and how I worked around them.

There were two primary shared components, a common header and footer, and the "News Crawl" on the homepages.

This header and footer appear on every page of every site:

Common header

Common footer

The HTML and the menus for these components were created by a custom module that I wrote. The defaults were all the correct forms of the links, so simply enabling the module would insert the menus in the correct place. This saved me from adding the same 20 menu items 6 times...

The other shared component was the "News Crawl", a box on the homepage with short news messages (that don't crawl, incidentally).

News crawl

This I built using a crazy combination of CCK, Views, Views RSS, and Feeds module. It has a central administration page on the parent site, and all sites import items from a feed. (More about this in another post)

Besides that, users and other tables are pulled into a shared database in the settings.php file. Here's a peek at my settings.php file:

$db_prefix = array(
  'default'              => '',
  'users'                => 'drupal_shared.',
  'role'                 => 'drupal_shared.',
  'users_roles'          => 'drupal_shared.',
  'sessions'             => 'drupal_shared.',
  'sequences'            => 'drupal_shared.',
  'workflow'             => 'drupal_shared.',
  'workflows'            => 'drupal_shared.',
  'workflow_access'      => 'drupal_shared.',
  'workflow_states'      => 'drupal_shared.',
  'workflow_transitions' => 'drupal_shared.',
  'multisite_search_dataset' => 'drupal_shared.',
  'multisite_search_index'   => 'drupal_shared.',
  'multisite_search_sites'   => 'drupal_shared.',
  'multisite_search_total'   => 'drupal_shared.',
);

Users and roles were shared, but permissions were not. This is because I have different modules/features enabled on different sites, and didn't want to give everyone the same access. This is potentially a major pain, though. Enabling a module on every site requires setting permissions for every site—which is easy to forget.

One last thing—shared search. Since 3 websites became 6, we wanted search to be integrated between sites, so that no content that was rearranged was lost. I ended up resurrecting an abandoned project called Multisite Search to do that part for me.

Shared Sign-on/Single Sign On was looked at and desired, but it was again rather unstable and complicated, threatening another "house of cards" installation, so I abandoned it.

The Verdict

My struggle with this business was wrapped up about 9 months ago. I'm sure that in that time I've learned some more tricks and would have tackled some of these problems differently. I'm also sure that some of these modules have changed and matured since then. But when it came down to it, after evaluating the pros and cons of both approaches, Multisite was the way to go for us.

Next post: Themes and sub-themes

Comments

Dave Reid's picture

People should only be seriously evaluating or using Domain module if they are sharing content across sites. If your sites share common features, but not content, multisite is he way to go.

wjones's picture

Yes.

wjones's picture

OMG, Dave Reid commented on my blog post, and I totally dismissed it! I met Dave at DrupalCon, he's like my hero! You're the man Dave, I'm sorry!

rescue's picture

apakah anda ingin mencari hotel murah di depok ? serahkan saja kepada kami karena kami mempunyai banyak
pilihan hotel murah di depok . penginapan murah di depok . info lebih lengkap klik here

pioneerseo's picture

Hello' This is a great article.I am pretty much pleased with your creative and informative work.You put really very helpful information and ideas. you did a good job! keep it up! export certificate of airworthiness

pioneerseo's picture

The Best ToothPaste Must Taste Good!Although many of these are fluoride free toothpaste, even if they did not contain the other contaminants listed above, something that tastes horrible I would also not consider the “Best Toothpaste”.http://4secat.net/

wallens's picture

I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well!
Cheap SEO Packages

Anonymous's picture

We are the Benidorm Weekend specialists. With over 70 years travel industry experience between our team, we will ensure that you have the most amazing stag or hen weekend. benidormweekends.co.uk

Anonymous's picture

I'm truly pleased that you simply could supply this particular beautifully comprehensive post today! The facts listed here are simply beautiful plus they truly assisted me in my personal task. Continue the good work! simone myers

james's picture

Your site is fantastic. I’ve bookmarked your site in my browser; I hope in future days I’ll get more valuable information from your site.
hack clash of clans android | pou infinito

wallens's picture

I read that Post and got it fine and informative. Please share more like that...
https://www.rebelmouse.com/jennyboltonboostyourbustreview/

james's picture

I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates. fast essay

wallens's picture

Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!
Video Maximus

wallens's picture
wallens's picture
project freetv's picture

I know you have huge amounts of involvement in composing that is the reason you can compose such an astounding article. project freetv

best web server's picture

This article is exceptionally fascinating and remarkable. I must respect your endeavors. best web server

wallens's picture

Thanks you very much for sharing these links. Will definitely check this out..
click here

wallens's picture

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.
https://twitter.com/newspaper_cat/status/580957813314228224

wallens's picture

It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.
Business Adverts

wallens's picture

This one is good. keep up the good work!..
Reserveringssysteem

wallens's picture

Thank you for taking the time to publish this information very useful!
skype

wallens's picture

Thank you for taking the time to publish this information very useful!
1800 Title Loan in Los Angeles

wallens's picture

Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here.
Text A Psychic

wallens's picture
wallens's picture
wallens's picture

Hi! Thanks for the great information you havr provided! You have touched on crucuial points!
amasuite 4.0 review

wallens's picture

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...
Click

wallens's picture

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,
Fat Diminisher System

wallens's picture

Absolutely fantastic posting! Lots of useful information and inspiration, both of which we all need!Relay appreciate your work.
play euromillions online

wallens's picture

Absolutely fantastic posting! Lots of useful information and inspiration, both of which we all need!Relay appreciate your work.
advertising agency los angeles

wallens's picture

Love what you're doing here guys, keep it up!..
ap electrical contractors Birmingham

Anonymous's picture

This may be one of the best bits of substance I had inside quite a while.Driving school

wallens's picture

Nice Informative Blog having nice sharing..
Lagrill Restaurant

wallens's picture

I read that Post and got it fine and informative. Please share more like that...
AffiloJetpack 2.0

wallens's picture

It is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing.
sony over ear headphones

jhon's picture
dragon city cheat's picture

Pleasant to see the quality data introduced in a simple and comprehension way. dragon city hack online

wallens's picture

Great post I would like to thank you for the efforts you have made in writing this interesting and knowledgeable article.
Hosting Malaysia

betaalbare website's picture

I've perused your things before and you are just excessively magnificent. betaalbare website

wallens's picture

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...
narrow boat builders

wallens's picture

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,
http://the-wandervale-executive-condo.com

celen's picture

Glad to going by your site.great article and great site,These are difficult to come by,Hope you have another great post.
http://www.gangstarvegashack.team9.org

ignou's picture

Love to read it,Waiting For More new Update and I Already Read your Recent Post its Great Thanks.

jhon's picture
jhon's picture
ignou's picture

This is a truly good site post. Not too many people would actually, the way you just did. I am really impressed that there is so much information about this subject that have been uncovered and you’ve done your best, with so much class. If wanted to know more about green smoke reviews, than by all means come in and check our stuff.

Loft conversions Wandsworth's picture

Great article Lot's of information to Read...Great Man Keep Posting and update to People..Thanks

wallens's picture

Nice Informative Blog having nice sharing..
head soccer

Anonymous's picture

This is one of the best articles to read on the internet right now. It's been developed so beautifully, that you cry every time you finish reading this. You must keep going on with this. http://winningterrorism.lammywalnessguide.com

Pages

Add new comment