- Issue created by @jeffreysmattson
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Can you provide steps to reproduce on a clean install?
- πΊπΈUnited States jeffreysmattson
I had installed the module using composer and then enabled this module using config. This doesn't run the install hook so the module was not installed correctly.
The solution was this:
1. Installed the module with composer.
2. In the UI or using Drush enabled the module.
3. Exported the configs.
4. Module works as expected after site creation and config import.
5. Profit.This is something that people may not know about Drupal. I sure didn't.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Thanks for updating the issue with your findings. Not everyone does that so I really appreciate it.
- πΊπΈUnited States barbarae
3 months to figure out this issue:
Here is the solution we used:
drush ev " use Drupal\field\Entity\FieldConfig; FieldConfig::create([ 'field_name' => 'group_roles', 'entity_type' => 'group_relationship', 'bundle' => 'administrators-group_membership', 'label' => 'Group roles', 'required' => FALSE, 'settings' => [], ])->save(); "
This worked!
so, replace "administrators" with your group machine name and run the script. It creates the missing group_roles . Only do this if you are actually missing the group_roles.
The need for this fix was due to a botched hook update execution along the way somewhere , or botched upgrade. We ran this script to avoid having to re-install from scratch. Now the /admin/group route loads without crashing although we did have to reload our opcache (apcu) and rebuild drupal cache also.
- πΊπΈUnited States barbarae
Ideally the hook_update would handle sanity checks and ensure the expected group_roles exist.