Unable to install Domain Access module in Drupal 7.10. After following installation instructions to a T, I get following error:

Fatal error: Call to undefined function db_query() in /sites/all/modules/domain/domain.bootstrap.inc on line 115

Then I add:

include_once DRUPAL_ROOT . '/includes/database/database.inc';

...to top of domain.bootstrap.inc

And then I get:

Fatal error: Call to undefined function theme() in /includes/install.core.inc on line 707

And the chain just keeps going and going with more and more errors no matter what I include. I am using latest module code and latest Drupal core. Ideas?

Comments

agentrickard’s picture

Category:bug» support
Status:Active» Postponed (maintainer needs more info)

Have you editing settings.php as instructed?

Seriously, if this were a real issue, I'd never have released the module.

agentrickard’s picture

Status:Postponed (maintainer needs more info)» Closed (works as designed)
jwilson3’s picture

In my case, I was getting this error because the include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc'; was coming *before* the $databases array, due to the nature of how we have our settings.php files setup, we have a shared_settings.php file that gets included for all settings environments.

Since each environment has a different database, the only solution was to create duplicate code, by putting the domain settings include file in each environment's settings file *after* the database declaration, instead of in the ideal place (inside the shared settings include).

jwilson3’s picture

Issue summary:View changes

Fatal error: Call to undefined function db_query() in /sites/all/modules/domain/domain.bootstrap.inc on line 115

BR0kEN’s picture

Issue summary:View changes

The error occurs when I'm trying to use Behat. I've included the "settings.inc" of the Domain module into my "settings.php", then execute the "behat -dl" and got an error: "Fatal error: Call to undefined function db_query() in /private/var/www/drupal/drupal-builds/compass/site/profiles/compass/modules/contrib/domain/domain.bootstrap.inc on line 112"

BR0kEN’s picture

Status:Closed (works as designed)» Active
BR0kEN’s picture

Version:7.x-3.3» 7.x-3.11
Category:Support request» Bug report
Priority:Normal» Major
Related issues:+#1342740: Bootstrapping Drupal to run scripts from command line breaks when domain module is in use
BR0kEN’s picture

Status:Active» Needs review

Please, look at the related issue!!