Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After joining a Group, the member is directed to their Group page. I would expect them to be directed back to the page they were viewing before clicking to join the Group
This might be related to the redirect after group creation: https://github.com/goalgorilla/open_social/pull/763
Comment | File | Size | Author |
---|---|---|---|
#3 | social-redirect-to-group-after-join-2973550-3.patch | 976 bytes | Makishima |
Comments
Comment #2
KingdutchLink to correct PR in issue summary
Comment #3
Makishima CreditAttribution: Makishima at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedHere I created patch for this issue ^
PR: https://github.com/goalgorilla/open_social/pull/904
Comment #4
Makishima CreditAttribution: Makishima at Lemberg Solutions, Open Social, Drupal Ukraine Community for Open Social commentedComment #5
bramtenhove CreditAttribution: bramtenhove for Open Social commentedMerged, thanks! Will be in the 2.1 release.
Comment #8
grn CreditAttribution: grn commentedHi.
We have added a custom group type, and the redirection to the about page does not work. Can you guys maybe point us in the right direction to find the error?
Thanks!
Comment #9
grn CreditAttribution: grn commentedSo I dug a bit deeper into this. I think the issue might be in the "$group->bundle()" array. Could it be that new custom groups don't automatically go into the "$group->bundle()"? If not, how would I get a custom group into that bundle?
For instance, we have a custom group type called "Chapter".
The form value is: value="group_content_chapter-group_membership_group-join_form"
A "Closed Group" where this is working is a part of the group bundle, and the value is: value="group_content_closed_group-group_membership_group-join_form".
Then "chapter" is missing from the group bundle, right?
Comment #10
KingdutchHi grn,
In the future it's probably better to open a new support request for this instead of commenting on a closed issue as closed issues don't show up in issue queues by default. For now I'll put the answer here as well so that others may find it too.
You were close to the solution. We implemented an alter hook
hook_social_group_types_alter
that allows you to opt-in to some of the Open Social behaviour for groups. This redirect is one of them. You can find an example in thesocial_group.api.php
.I hope this solves your issue :)
~ Alexander
Comment #11
grn CreditAttribution: grn commentedHi Alexander.
Thanks for the answer.
Just to keep the same thread I will answer here too.
Do you mean that I will need to add a custom module, if I want to add a custom group type in open social with the same open social group functionality?
Thanks.
Comment #12
KingdutchAh, I forgot that the UI allows you to create group types as well. Yes that will indeed be needed, there's no functionality to opt-in to that through the UI at this time.
Comment #13
grn CreditAttribution: grn commentedOK, thanks.
If there is any other documentation for best practice creating custom group types and modules for this case, please let me know. The custom group type we need is with same functionality as the "closed group" type.
Otherwise, thanks anyway. :-)