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.
When my profiler installation profile completes, the success screen shows the following error:
You do not have permission to unblock placeholder-for-uid-1.
This doesn't appear to cause any problems on a manual installation - however when installed through Aegir it causes Aegir to report that the site creation on this platform failed.
Commenting out the creation of user 1 in the .info file didn't solve the problem, it just displayed the screen to create the admin user - but then still showed this error on the success screen.
Comment | File | Size | Author |
---|---|---|---|
#10 | 923882-administerusersbyrole-install-issue-D7.patch | 611 bytes | mrfelton |
Comments
Comment #1
steveparks CreditAttribution: steveparks commentedThe issue appears to be caused by something in this (in profiler_api.inc), which is the last function to be called by profiler before completing...
googling has brought up nothing about the error message mentioned above. Has anyone else had this same message?
Comment #2
q0rban CreditAttribution: q0rban commentedHey Steve! Sorry for the delay in responding.. :)
A few questions:
- What version of Aegir are you running?
- Are you creating any users in your profile's .info file?
- If so, have you tried commenting them out?
- If not have you tried adding an entry for user 1
Comment #3
steveparks CreditAttribution: steveparks commentedHi q0rban,
No problem, and no rush - any help is appreciated. I tried to figure it out on my own, but couldn't quite get there :)
I'm running:
+ aegir version 4.0-alpha13 on one server and alpha14 on the other - both get the same problem
+ profiler 2.0-beta1
The install profile I'm building, and that I get this problem with can be built using this stub makefile:
drush make http://github.com/pilotinternet/jumpjet/raw/master/jumpjet_build_core.make jumpjet
However it's not just in the interaction with aegir that this error occurs - that error message is generated during a manual install too, it's just that the presence of an error (even though the site and DB are all installed fine) stops aegir in its tracks. It may also confuse other users that I plan to release the distribution to.
I have tried not creating users in the profile's .info, and I've tried creating them - the same error is created regardless.
Thanks for profiler - am finding it very powerful and simple.
cheers
Steve
Comment #4
Riaan Burger CreditAttribution: Riaan Burger commentedHaving the same problem here.
I also just now noticed that when this error occurs, I'm not logged in once the install completes.
Disabled some modules in the profile and wittled things down to the administerusersbyrole module.
An earlier search through all files for the string "You do not have permission to unblock" didn't reveal anything. But now I see line 117 of the module is:
drupal_set_message(t('You do not have permission to !action %user.'...;
A few drupal_set_message lines and the error fires because of line 62:
Where, of course, $account=>uid is equal to 1.
That's about where I ran out of time to check this out, but maybe it helps.
My quick workaround was to remove the module from the _profile_modules() function in my profile and add then add it later in the profile as follows with pilfered code from the /modules/system/system.admin.inc file:
This doesn't give an error and installs fine.
Comment #5
q0rban CreditAttribution: q0rban commentedAh yes, I before had some custom code in here to account for the administerusersbyrole module, but I've since removed it since I'm not happy with the way that module implements it's functionality. Steve, are you using that module as well? If so, I think we need to move this issue to administerusersbyrole, as it really is a bug in that module's implementation.
Comment #6
steveparks CreditAttribution: steveparks commentedaha - yes. I'm using administerusersbyrole too.
Nice work Riaan.
I've moved it between issue queues, and changed the title - but q0rban - perhaps you'd explain to the administerusersbyrole maintainer what workaround you'd previously implemented?
Comment #7
q0rban CreditAttribution: q0rban commentedIf I remember correctly, I was tricking the install profile into thinking that user 1 was logged in while user 1 was being unblocked. See line 383 of the old profiler include:
http://drupalcode.org/viewvc/drupal/contributions/modules/profiler/profi...
Comment #8
dkingofpa CreditAttribution: dkingofpa commentedSub
Comment #9
mrfelton CreditAttribution: mrfelton commentedSame issue here for me. Aegir 1.9, and have the the administerusersbyrole module enabled as part of a dependency from a feature that gets enabled as part of the install profile. Aegir will not complete the site spin up because of the error.
Comment #10
mrfelton CreditAttribution: mrfelton commentedHere is a path against the D7 version in @axel.rutz's sandbox (http://drupal.org/sandbox/axel.rutz/1350924) form #908424: Drupal 7 port of Administer Users by Role. I suspect it will apply cleanly to the D6 version.
Comment #12
mrfelton CreditAttribution: mrfelton commentedBumping this to 7.x-1.x. Lets get it fixed there first, and then look at backporting.
Comment #13
mrfelton CreditAttribution: mrfelton commentedMarking #371545: Administer Users By Role breaks if used in an install profile as a dupe.
Comment #14
mrfelton CreditAttribution: mrfelton commentedFixed for D7 here, and D6 here.