I am using Group module and Drupal 8.

  1. After adding a new group, the page will be redirected to the corresponding group page(ie. /group/5) but I want to change it to be the group edit page (ie. /group/5/edit)

  2. After relating/creating an entity in group, the page will be redirected to the gnode page (ie. /group/5/content/116) but I want to change it to be the group content page (ie. /group/5/content)

I have read this issue but I want to solve this problem using either installing modules or creating a custom module.

I am new to Drupal and programming so it is great to have some clear and complete elaboration.



If The issue you posted about promises to solve your problem then your best bet would be to test the patch (always on a test server) and help this issue forward so others can take advantage of that in the future, because this is how drupal progresses mostly.

Just download the latest .patch that you find in the group modules directory and open up up a command window (in windows) or shell in linux based systems and apply the patch

in a linux based system you could run the following commands, assuming group is in modules/contrib/group and using latest patch as an example

cd modules/contrib/group
wget https://www.drupal.org/files/issues/2817109-by-rachel_norfolk-ericras-How-to-redir.patch
git apply -v 2817109-by-rachel_norfolk-ericras-How-to-redir.patch

If the patch does not report any errors you will probably get a configuration field to do what you are asking and it would be great to post in the thread how the patch went for you.

More on patches here

If you want something different you should create your own module and implement a hook_form_alter to set setRedirect for both of the forms that you mention similar to what rachel_norfolk does in comment #3

  • So there is no way to solve this problem other than applying patch? Because the issue posted does not fit my requirements 100%. It will be redirected to the group page (ie. /group/5) after relating/creating an entity. – wrigamer Jan 15 '18 at 9:21
  • You probably can. Sorry maybe I misundestood your question ... so the patch would not solve your problem ? I have not read through the whole issue and what the patch does ... from your comment I thought that this issue would help solve your problem ... let me look it over. – GiorgosK Jan 15 '18 at 9:28
  • Yup, the patch does not solve my problem but thanks a lot for your help! In fact I was quite confused about the patches before and now I learn more about them. – wrigamer Jan 15 '18 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.