Hi,

The submit callback of the withdraw confirm form does a drupal_goto() and that, among other side effects, it is not possible to alter the redirection from custom modules.

File affected is includes/invite.pages.inc
Function invite_withdraw_form_submit()

The fix is pretty trival:

-  drupal_goto('<front>');
+  $form_state['redirect'] = '<front>';

Cheers

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robmc’s picture

I second this change!

Cheers,

Rob

lhridley’s picture

Status: Needs review » Needs work

Please submit a patch for this.

moertle’s picture

Status: Needs work » Needs review
FileSize
649 bytes

There you go

moertle’s picture

Sorry, wrong patch, another try

kaare’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
486 bytes

Patch works as recommended, and without this patch it's impossible to add our custom redirect destination as described in Redirecting a Form.

I've tested this patch with and without custom redirection and the invite_withdraw_form() now behaves as expected.

I've recreated this patch better suitable for project maintainers to apply quickly (i.e. without the sites/all/... path.

ckng’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the code, committed.

  • kaare authored bc6f88f on 7.x-4.x
    Issue #2227995 by moertle, kaare: Avoid drupal_goto() within...

Status: Fixed » Closed (fixed)

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