The change to hook_requirements in 1.1 has broken install. Hook requirements runs on the Verify requirements step of the installer and the module attempts to call user_roles(), throwing an Exception with the following error:
The specified database connection is not defined: default
Hook_requirements needs to check the $phase in use and wrap code accordingly, so as to prevent this.
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...
This was caused by this change: #1524292: Use hook_requirements instead of hook_enable
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | fix_broken_installation-2483015-9.patch | 2.58 KB | rutiolma |
| #2 | username-2483015-2.patch | 4.82 KB | mikebarkas |
Comments
Comment #1
xtfer commentedComment #2
mikebarkas commentedI also had build failure.
I wrapped the code with a $phase runtime check as to not run during installation.
I also changed t() function to get_t() to improve future implementations of install requirements.
Attached patch.
Comment #3
bdone commentedmanually tested #2 using 7.x-1.1 and the guardr profile. confirming that this gets installs working again. thanks @mikebarkas!
Comment #4
rob c commentedDito #2.
Let's update that status.
Comment #5
rooby commented+1 for getting this one in.
Comment #7
matt v. commentedThanks mikebarkas! I've committed the patch.
Comment #9
rutiolmaThis issue is also present on the 8.x version.
I'm attaching a patch to prevent this from running during the installation phase.