Hello, I have Drupal 4.6.6. Recently installed the send module (v.1.20). Works fine except that the node that comes through email has bad links in it; the node title, submitted by user and node type links come with an extra "?q=" that breaks it.

I'm searching Drupal right and left for a solution but haven't found any; decided to post here in case someone has run into this before and knows the answer (or a location in Drupal.org where an answer has already been posted).

Thanks!
ZoneV

Comments

ZoneV’s picture

Ugly, but works.

In send.module, right after line 252 (line 253), made a copy of $body stripping out the "?q=", like this:

$body_copy = str_replace('?q=','',$body);

Then, on line 258 (259 after adding the previous line) I passed $body_copy instead of $body.

if (send_message($sender,$recipients,$body_copy,$nids, etc...

The net result is that the node links are correct on the node right after you send the node and also on the email msg.

I'm sure some seasoned PHP salts can make this better as I'm just starting to roll up my sleeves and learn about PHP and Drupal. But at least I'm trying to help and this is how I solved my problem.

ZoneV

ZoneV’s picture

...replaced $body_copy for $body in

mimemail($sender, $self, $subject, $body);

Otherwise copy to myself messages came with the wrong links as before.