domain access

Let's face it - sometimes you need a copy of a site running Domain Access on your local machine. It does require some tweaking to get it up and running since you need at minimum to change your hostnames. I keep a query around for each local site db to do this for me (automation is your best friend after all). It's plain and simple if you are using subdomains but it can easily be adjusted to full domain names:

UPDATE domain set subdomain = replace(subdomain,'thebeehive.org', 'beehive.trunk');

This query will replace all thebeehive.org occurrances in domain table with beehive.trunk.

And for the heck of it make sure sessions and watchdog tables are empty before you start:
TRUNCATE sessions;
TRUNCATE watchdog;

Recently I was writing an update for a site that required that Domain Taxonomy module be installed on the site and all current forums be published in site's default language and to all domains. I was also decided that Forum vocabulary should be with per term languages (yes, that makes forums per language and per domain).

Normally one would write the updates in the following order:

Domain Access 6.x-2.2 was released yesterday. This is the last 6.x release, further development will go into 7.x branch.

Things to be aware of from a developer perspective:

  • Change to hook_domainwarnings() - http://drupal.org/node/692772. Won't break existing modules but will prevent new functionality from working.
  • New hook_domain_warnings_alter() for cases where hook_domainwarnings() is possibly overridden by Domain Settings - http://drupal.org/node/721148
  • Now with basic Drush support
  • Generate domains on the fly with Devel