-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fails on microsite installations #125
Comments
I wonder if we can wrap the update hook and use statements in a conditional to check if localgov_roles is enabled. |
Nope!
https://www.php.net/manual/en/language.namespaces.importing.php#language.namespaces.importing.scope I can replicate the error though. |
Any suggestions @dedavidson @ekes @MariosORION ? |
Maybe we don't need the use statement, if the rest is conditional. |
Could turn your idea round and put the update in localgov_roles and check if localgov_geo is enabled? |
Yeah, starting to think that's the best (only?) way. We can't wrap the use statement in a conditional. We can't access the RolesHelper::CONTRIBUTOR_ROLE without the use statement. (or can we? ) Kind of run out of time on this for today, but keen to fix this quickly. Anyone else got any bandwidth to try other things? Also, if we move it, what do we do with the update hook? Leave it in place but empty? |
Can we use a FQN without use e.g. |
Good shout, trying that now https://github.com/localgovdrupal/localgov_geo/pull/126/files Seems to work fine for me locally, and if the roles don't exist, they don't get loaded, so no harm done. |
The hook_update added in #121 fails on microsite installs as the localgov_roles module is (rightly) not enabled.
The text was updated successfully, but these errors were encountered: