I don't see changes in tables, the nid is always 0.

I have made a test in forward.module at line 707
if ($nid == '') {
$nid = 0;
$returnurl = '';
}

I try $nid=15; and the change is applied in the table ...

The problem is that $nid is empty ! automatically you assign 0 and tables are updated with nid =0 ...

Somebody has the same problem?

Comments

pixelpreview@gmail.com’s picture

StatusFileSize
new10.25 KB
new41.51 KB

webmaster for dynasite.be - dynasite.ma

dantw’s picture

I'm having the same problem that forwarding a content article (blog, story, etc) while recording a 'SENT' type in the forward_log table, the corresponding inserted nid was always 0. As a result, the 'Most Emailed' and 'Most Forwarded' blocks are pretty much useless. I have Drupal 5.10 running on IIS6.

Would appreciate any advice. Thanks.

windhamdavid’s picture

same problem :)

windhamdavid’s picture

replaced

if ($nid == '') {
$nid = 0;
$returnurl = '';
}

with

$arg1=arg(1);
if (is_numeric ($arg1)) {
$nid=$arg1;
}
else {
$nid = 0;
}
$returnurl = '';

pixelpreview@gmail.com’s picture

perfect for forward module but not for clicktroughs blocks enbaled with forward module. I have the same problem no table update when I click in the mail and when the forward_tracker function is called.

yes it's the same problem no nid ... here

 if ($nid == '0') {
 db_query("UPDATE {forward_statistics} SET clickthrough_count = clickthrough_count+1 WHERE nid = %d", $nid);
    db_query("INSERT INTO {forward_log} (nid, type, timestamp) VALUES ('%d', '%s', %d)", $nid, 'REF', time());
    drupal_goto(drupal_get_path_alias(''));
}

at line 342 and line 355 if nid != 0

same changes to make like the forward function above

perhaps a problem with url rewriting ...

$args = substr($_GET['q'], strpos($_GET['q'], '/')+1);
$args = substr($args, strpos($args, '/')+1);

to retrieve the nid in arguments

I change this :

function forward_tracker($nid = '0') {

  $args = substr($_GET['q'], strpos($_GET['q'], '/')+1);
  $args = substr($args, strpos($args, '/')+1);

by

function forward_tracker($nid = '0') {
$nid=arg(3);  

and that's work.

because the link in email is for example http://lwww.site.com/forward/emailref/node/10

it's the arg(3) to retrieve the nid

if you have an another idea ?

seanr’s picture

Status: Active » Fixed

Looks like no release had been made for 5.x-1.17 (though if you were using 5.x-dev, that'd work fine). I've made the new release now; please update to that. Sorry for the confusion.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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