- Issue created by @Vacilando
- 🇧🇪Belgium Vacilando Brussels
Solved by deleting and adding role "authenticated". Not sure why it was needed.
In any case, I suggest making
$role = Role::load('authenticated');
(https://git.drupalcode.org/project/google_analytics/-/blob/4.x/google_an...)
conditional, as it's not guaranteed that every system will have a role with that name. - 🇮🇳India arunkumark Coimbatore
Verified the issue with the latest version of Drupal. Unable to replicate the issue. Attached screenshot of the successful installation and uninstall of the module.
Drupal core: 10.0.3
Google Analytics: 4.0.2 - Status changed to Closed: cannot reproduce
over 1 year ago 9:25am 3 May 2023 - 🇳🇱Netherlands Tr4nzNRG
I had a similar situation where the module was enabled on a different develop environment (most likely with authenticated role present in the database).
Than when I was setting up a new develop environment (with recent database from production without authenticated role), It caused an error on the drush deploy.
Error: Call to a member function grantPermission() on null in /var/www/html/htdocs/modules/contrib/google_analytics/google_analytics.install on line 17 #0 [internal function]: google_ analytics_install(true)
I think you can replicate the situation by first removing the authenticated role and than installing the module.
- Status changed to Active
over 1 year ago 3:31pm 8 August 2023 - 🇳🇱Netherlands vinlaurens Utrecht, The Netherlands
Unfortunately, I was able to reproduce this using a pipeline in Gitlab which does a fresh site install with drush.
Drupal version: 10.1.2
Google Analytics: 4.0.2
PHP: 8.1 - 🇦🇺Australia Stefan Lehmann
We have a same issue as vinlaurens with the same Stack.
I just wrote a little check if that user role was successfully loaded.
- Status changed to Needs review
over 1 year ago 6:29am 11 August 2023 - last update
over 1 year ago 15 pass - last update
over 1 year ago 15 pass - 🇦🇺Australia Stefan Lehmann
Funny I just realised after doing it last weekend that this is just a duplicate of https://www.drupal.org/project/google_analytics/issues/3373921 🐛 Cannot install from existing config RTBC
I basically created exactly the same patch as the guy in that ticket. :-)
- Status changed to Closed: duplicate
over 1 year ago 12:00am 16 August 2023