Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The installation on 7.x drupal doesn't work because db_query return an object so that code is wrong !
$rid = db_query("SELECT 1 FROM {role} WHERE name LIKE 'admin%%'");
if (!$rid) {
I fixed with that :
$rid = db_query("SELECT 1 FROM {role} WHERE name LIKE 'admin%%'");
if (!$rid->rowCount()) {
The patch in attachment
Comment | File | Size | Author |
---|---|---|---|
#1 | adminrole_installation_fixed-2340763.patch | 487 bytes | Fabulous |
Comments
Comment #1
Fabulous CreditAttribution: Fabulous commentedComment #2
Fabulous CreditAttribution: Fabulous commentedComment #3
liquidcms CreditAttribution: liquidcms commentedi'll commit something similar:
Comment #4
Dave ReidIt would be better to do something like this and properly use db_like() as well:
Comment #5
liquidcms CreditAttribution: liquidcms commentedi committed Dave's version to 1.x
Comment #7
Fabulous CreditAttribution: Fabulous commentedI've just download the 7.x-1.0 version and the patch is not in... Please fix it.
Comment #8
liquidcms CreditAttribution: liquidcms commentedas stated in #5.. the fix is in the -dev release (how did this tagged as critical?)
Comment #9
liquidcms CreditAttribution: liquidcms commentedthis is included in 7.x-1.1