This is the first time I am using this module. Setup looks very simple. The issue that I am encountering is that after a successful or failed submission of an email the browser is redirected to the home page and the Constant contact message is displayed. I have left the redirect field in the setup form blank and would expect that the page where the form is located at would display the message.

Comments

justphp’s picture

Assigned: Unassigned » justphp

I'll look into fixing this in the next release.

justphp’s picture

Status: Active » Closed (fixed)

Fixed, will be available to download later today.

johnpicozzi’s picture

Version: 6.x-3.0 » 7.x-3.6

I seem to be having this problem with the D7 version.

svipsa’s picture

Problem with redirect because when $redirect_to is empty

$form_state['redirect'] = $redirect_to; 

redirect form to homepage.

fast solution: write own submit function and:

if (!empty($redirect_to)) {
    $form_state['redirect'] = $redirect_to;
  }
altrugon’s picture

Issue summary: View changes
StatusFileSize
new623 bytes

From drupal_redirect_form documentation:

If $form_state['redirect'] is missing, the user is usually (again, see below for exceptions) redirected back to the page they came from

This patch assign a value to $form_state only if it is not empty.

altrugon’s picture

Status: Closed (fixed) » Active

I have re-open this issue because the version has been changed to 7.x and the bug still exists. The patch that I have attached on my previous comment fix the problem.

Please review and integrate it into a new release if the output is positive.

Thanks.

flyke’s picture

Confirmed that Constant Contact version 7.x-3.6 still redirects to the homepage after submit, and that patch #5 is working so you stay on the same page after submit.

anthony0perez’s picture

Patch number 5 doesn't work if you need it in a pop up. When it refreshes it doesn't have error or success codes. Is that then intended outcome?