About 2 years ago, back when we were still using Groups v1 with older versions of all modules, we used the same example from @mr.andrey. It has been working fine throughout the time, but suddenly it's presenting issues after moving to Groups V3 and grequest v3.1.
In my case, I'm using the three events below:
- group_membership_request.create.post_transition
- group_membership_request.approve.post_transition
- group_membership_request.reject.post_transition
From our tests, the ones from approval/rejection are being triggered just fine, but the create one (called after a Group Membership Request is created) isn't being called. As a result, our custom notification mechanism stopped working for new requests.
My guess is that it stopped working for the newer versions. At least as a temporary workaround, probably a "hook_group_relationship_insert" would work, for detecting any Group Membership Requests creation attempts.
In my case, the site continues to work fine, but whenever I clear Drupal cache, I get the following error:
Symfony\Component\HttpFoundation\Exception\BadRequestException: Invalid URI: A URI must not start nor end with ASCII control characters or spaces. in Symfony\Component\HttpFoundation\Request::create() (line 371 of /var/www/vendor/symfony/http-foundation/Request.php).
Is it somehow related to the bug reported here?