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

CommentFileSizeAuthor
#1 simplnews_analytics_746424-1.patch1.2 KBsutharsan

Comments

sutharsan’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new1.2 KB

Thanks for the code. It's now committed. I also added a conversion from old to new token (patch).

henrijs.seso’s picture

Status: Fixed » Reviewed & tested by the community

I don't see code from original/patch post in -dev version or in release!

sutharsan’s picture

Status: Reviewed & tested by the community » Fixed

The 6.x-1.x-dev snapshots were taken from HEAD. Now corrected. Checkout CVS or wait 12 hours to get your new snapshot.

Status: Fixed » Closed (fixed)

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

Arjean-1’s picture

Status: Closed (fixed) » Reviewed & tested by the community

I 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.

thijsvdanker’s picture

@Arjean It's only commited to the 6.x-1.x branch, not the master branch.
@Sutharsan could you please fix this?

sutharsan’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

The master branch is no longer in use. Use development branches like 6.x-1.x instead.

Status: Fixed » Closed (fixed)

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