- Issue created by @bander2
- πΊπΈUnited States bander2
I can confirm that this issue does not exist in Drupal 10.0.9. So, maybe this is due to a change in 10.1.
- last update
over 1 year ago 15 pass - π³π±Netherlands corneboele
Was running into this issue as well. MR looks good to me, thanks!
- π³π΄Norway eiriksm Norway
Had a small suggestion in the MR. Otherwise, it works good and is simple enough :)
- Status changed to RTBC
over 1 year ago 11:17pm 28 July 2023 - πΊπΈUnited States pookmish
I needed this with Drupal 10.1 as well. MR worked for me.
- last update
over 1 year ago 15 pass - πΊπΈUnited States loopy1492
Thanks! Seems to be working for our site during pipelines ci run. I am adding a patch file from the MR diff for those who would rather use a flat patch file in composer.
- π³π±Netherlands seanB Netherlands
In #3349663-7: Error: Call to a member function grantPermission() on null in userprotect_install() β neclimdul found out what is happening. In short, this is caused by the change in π Remove special case of User module install Fixed . Modules are installed first and the default config for the modules is imported later. Since the authenticated user role is default config of the user module, the role doesn't exist yet in the install hook of other modules.
We can add the permissions using
user_role_grant_permissions()
which is also used in core bymedia_install()
andnode_install()
. It basically uses the same checks as the patch, so we don't have to duplicate that code. We should probably also add a check for the user module existance (or add a dependency on the user module, but that seems a bit silly).Since this only seems to happen when installing sites from existing config, it shouldn't really matter that the module install hook can't add the permissions to the authenticated user role.
- πΊπΈUnited States DamienMcKenna NH, USA
While we wait for core to fix the underlying problem there, I can also confirm that patch #10 resolves the immediate problem.
- First commit to issue fork.
- last update
about 1 year ago 15 pass - ππΊHungary mxr576 Hungary
SAML have/had the same issue, IMO in this scenario we should just check if the config system is running or not, in other words, whether the side is installed from config or not.
https://www.drupal.org/project/simplesamlphp_auth/issues/3392203 π This module prevents Drupal from installing from configuration RTBC
(Hiding patch to avoid confusion)
- last update
10 months ago 15 pass - π¨πSwitzerland bircher π¨πΏ
I agree with #14 and disagree with #12, while in a deployment when this module is being added to a site, the subsequent config import will revert the change from the install hook, it is still not necessary and the latest patch is more correct and I wish more modules would do it that way.
RTBC +1 for the current code (attached patch for people with composer).
We use this in production and this patch allows us to install from config in our CI pipeline to run tests.
- ππΊHungary mxr576 Hungary
RTBC +1 for the current code (attached patch for people with composer).
FTR, I confirmed that patch#15 reflects the latest state of MR#33
β― interdiff 33.diff google_analytics-3373921-15.patch β― echo $?