Current Simplenews Analytics 6.x-1.1 not working with Simplenews 6.x-2.x.
Solution replace code in XXXX/sites/all/modules/simplenews_analytics/simplenews_analytics.module:151
From:
$tokens = simplenews_mail_tokens($context['account'], $context, $language);
$campain = strtr(variable_get('simplenews_analytics_utm_campaign', '!newsletter_name'), $tokens);
To:
// For 6.1.x simplenews
if (function_exists('simplenews_mail_tokens')){
$tokens = simplenews_mail_tokens($context['account'], $context, $language);
$campain = strtr(variable_get('simplenews_analytics_utm_campaign', '!newsletter_name'), $tokens);
}
else {
// For >6.2.x simplenews, because this version using tokens
$campain = token_replace(variable_get('simplenews_analytics_utm_campaign', '[simplenews-newsletters-name]'), 'simplenews', $context);
}
Working and with older Simplenews version. Use [simplenews-newsletters-name] insted !newsletter_name
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simplnews_analytics_746424-1.patch | 1.2 KB | sutharsan |
Comments
Comment #1
sutharsan commentedThanks for the code. It's now committed. I also added a conversion from old to new token (patch).
Comment #2
henrijs.seso commentedI don't see code from original/patch post in -dev version or in release!
Comment #3
sutharsan commentedThe 6.x-1.x-dev snapshots were taken from HEAD. Now corrected. Checkout CVS or wait 12 hours to get your new snapshot.
Comment #5
Arjean-1 commentedI might be missing something but it seems de patch hasn't been committed yet.
The last download available is from: 2009-Mar-05 and the simplenews_mail_tokens code is still there.
The patch from RemovE solved my problem.
Comment #6
thijsvdanker commented@Arjean It's only commited to the 6.x-1.x branch, not the master branch.
@Sutharsan could you please fix this?
Comment #7
sutharsan commentedThe master branch is no longer in use. Use development branches like 6.x-1.x instead.