This is an absolutely critical bug.

When a test mail is sent, the links are created correctly (i.e. each link has an individual short url).

When the actual newsletter is sent out (using cron),
(a) all links in the newsletter are the same (i.e. they are the same shorturl)
(b) the one shorturl link that is now under each link in the newsletter goes nowhere.

This error did not occur with 6.x-3.0-alpha2, suggesting that something was changed between alpha2 and alpha3 that causes this issue.

To recreate/test the issue, I created a test group and sent the newsletter to the test group.

PS: I suggest creating an alpha4 release, addressing this bug and including the patch I submitted addressing another issue in alpha3 (http://drupal.org/node/1370616#comment-5520888)

Comments

rmcom’s picture

Has anybody else encountered this issue?

This is an absolutely critical bug. If anybody sends a newsletter with this version (assuming it's what it is the bug it seems to be), no links in the newsletter will be operational.

I tried to track down the error, but there have been so many changes between alpha2 and alpha3, I could not find it.

It must have to do with the process by which cron creates each single link.

weseze, do you have an idea what it could be?

rmcom’s picture

weseze, do you have an idea where we could look in the code to fix this issue?

weseze’s picture

I didn t encouter this bug in development... Will have a look when I m home.

rmcom’s picture

I greatly appreciate it! I am in a bit of a bind because I cannot roll back for unrelated reasons.

rmcom’s picture

My database is postgresql. Could it be that some of the sql fixes are not compatible with postgresql now?

I am grateful for any hint.

weseze’s picture

Just tested on alpha3 and I can't reproduce this problem...
What version of Simplenews are you on? Have you got any other module installed that is involved in the proces of creating, editing and sending the newsletter?

Could you post the exact body-text from the node? And the generated mail?

You could also add some code so we can track the translation of links a bit: in "simplenews_statistics.module" line 345, just before
return $shortened_url;
add this

  watchdog('simplenews_statistics', '<pre>'.print_r($simplenews_statistics_internal_url, true).'</pre>');
  watchdog('simplenews_statistics', '<pre>'.print_r($shortened_url, true).'</pre>');

That should fill your watchdog with 2 messages per url so we can track if the links are built correctly.

rmcom’s picture

Great, thank you! I will try that this morning and will post watchdog messages back.

I have the following installed:

weseze’s picture

I'm running about the same modules on my test environment... But I'm also using wysiwyg, CKeditor, linkit, pahtologic and some other related modules.
So I'm guessing that it has nothing to do with other installed modules.

rmcom’s picture

Title: all (shorturl) links created during cron are the same » all (shorturl) links created during cron are the same/links not working
Status: Active » Closed (fixed)

Thank you very much for your support.

We found the error: it was due to moving our production server from a 64-bit architecture to a 32-bit machine.

The shorturl module stopped working because the link id (lid) numbers surpassed the maximum value for a 32-bit integer.

weseze’s picture

Priority: Critical » Minor
Status: Closed (fixed) » Active

I'm gonna leave this one open for now untill I am absolutely sure that it is fixed.

This might be a bug with shorturl then?

weseze’s picture

Status: Active » Closed (fixed)
kristofferrom’s picture

Version: 6.x-3.0-alpha3 » 7.x-1.0-alpha1
Priority: Minor » Major
Issue summary: View changes
Status: Closed (fixed) » Active

Just encountered this as well on this setup

simplenews Version: 7.x-1.1
simplenews_statistics Version: 7.x-1.0-alpha1

Any ideas how to debug?

Anybody’s picture

I can confirm the problem in 7.x! This is definitely broken. The newsletter was also sent by cron.