After having module Domain installed on site seo.whatever.com (not a top-level domain), got following warnings on each page: "Domain access failed to load during phase: bootstrap include. Please check your settings.php file and site configuration.". After taking a look at the code, I think it could because of following reason.
1. First, variable $domain['domain_id'] could be int 0 because of following code in function domain_lookup_simple():
// If no match => use default (0)
if (!isset($domain['domain_id'])) {
$domain['domain_id'] = 0;
}
2. Secondly, there are two possible errors in following code piece (function domain_init()):
// Error handling in case the module is not installed correctly.
if (!isset($_domain['domain_id'])) {
$_domain = domain_default(TRUE);
$_domain['error'] = 'bootstrap include';
}
// If $_domain['error'] is present, then set a message and stop.
if (!isset($error) && isset($_domain['error'])) {
$error = 'Domain access failed to load during phase: '. $_domain['error'] .'. Please check your settings.php file and site configuration.';
2.1. "if (!isset($_domain['domain_id'])) {" should probably be "if (!isset($_domain['domain_id']) && $_domain['domain_id'] !== 0) {";
2.2. Variable $error is not defined anywhere (can be safely removed).
Comments
Comment #1
deminyI'm wondering if this is caused by following SQL update in function domain_install():
// MySQL won't let us insert row 0 into an autoincrement table.
// Similar to the {users} table, this leaves us with no row 1.
db_update('domain')
->fields(array('domain_id' => 0))
->condition('domain_id', 1)
->execute();
Comment #2
deminyPlease ignore this bug report. After reading 'INSTALL_QUICKSTART.txt', it seems that I missed some key steps when installing this module.
Thanks.
Comment #3
agentrickard