Hi,
I'm not sure if this happens only to me, but after sending e-mail with this module the page is redirected to wrong page. E-mail is sent correctly and everything else works, but only the redirect is done to wrong page.

I have also "book"-module and phpMailer installed and also "human readable urls" (or what ever that feature iscalled :-) ) is enabled. So the problem might happen only with combination of those modules.

If I remember correctly the destination url where I was redirected was "/export/book/$number" instead of "/node/$number". (Sorry for not logging this.)

Here's diff from "print_mail/print_mail.inc" that fixed the problem for me:

35a36,43
>
>   // Remove the printmail/ prefix
>   $path = explode('/', $_GET['q']);
>   $path = $path[sizeof($path)-1];
>   if (is_numeric($path)) {
>     $path = 'node/'. $path;
>   }
>   /*
42a51,52
>   */
>
228a239,249
>
>   /*
>   // Remove the printmail/ prefix from path
>   $path = explode('/', $form_state['values']['path']);
>   $path = $path[sizeof($path)-1];
>   if (is_numeric($path)) {
>     $path = 'node/'. $path;
>   }
>   $form_state['values']['path'] = $path;
>   */
>

Comments

jcnventura’s picture

Status: Active » Fixed

Hi,

I didn't understand your fix, as it seems that you only reported half of it, and also it seems to be wrong as you're not removing the first element of the path and are only getting the last element of it. It's mostly OK to do that except that it stops generating the book export properly.

I have made a simpler change which should fix this problem.

João

Anonymous’s picture

Status: Fixed » Closed (fixed)

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