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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Evelienschut created an issue. See original summary.

Kingdutch’s picture

Issue summary: View changes

Link to correct PR in issue summary

Makishima’s picture

Makishima’s picture

Status: Active » Needs review
bramtenhove’s picture

Status: Needs review » Fixed

Merged, thanks! Will be in the 2.1 release.

  • 241733c committed on 8.x-2.x
    Merge pull request #904 from goalgorilla/feature/2973550-redirect-to-...
  • Makishima committed 4ee395e on 8.x-2.x
    Issue #2973550 by Makishima: Fix redirection to the group after user...
  • Makishima committed f14261c on 8.x-2.x
    Issue #2973550 by Makishima: Fix behat tests
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

grn’s picture

Hi.

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!

grn’s picture

So 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?

Kingdutch’s picture

Hi 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 the social_group.api.php.

I hope this solves your issue :)

~ Alexander

grn’s picture

Hi 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.

Kingdutch’s picture

Ah, 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.

grn’s picture

OK, 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. :-)