Posted by durruti on January 28, 2009 at 2:00pm
20 followers
| Project: | Simplenews |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
In my confirmation email the !mail_to and !site variables are working properly, but the !newsletter and !confirmation_url are not. This is the case either using the subscription form within the newsletter block or following a link to the form. You can see the form at http://openspace.coop/latest. Any idea what I'm doing wrong?
We have received a request for subscription of me@myaddress.org to the !newsletter on OpenSpace website at http://openspace.coop. To confirm this subscription please use the link below.
!confirmation_url Many thanks,
Matt
Comments
#1
With the latest release some of the variables have changed. See the description.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.
#3
!site & !mailto doesn't work for anonymous subscribers, because this tokens get from user_mail_tokens() :(
#4
#5
subscribe
#6
subscribe
Same issue here using Drupal 6.11 and simplenews 6.x-1.0-rc6
#7
Same issue here, !mailto and !site are not working in RC6 for annoymous users.
#8
subscribing
#9
subscribe
#10
In simplenews.module file, around line 2120, this code should fix the issue :
// Get tokens from user_mail_tokens() and add simplenews variables.if($subscription->uid) {
$vars = user_mail_tokens($subscription, $language);
}
else {
$vars = array();
$vars['!site'] = variable_get('site_name', 'Drupal');
$vars['!mailto'] = $subscription->mail;
}
If necessary, other variables can be found here :
http://api.drupal.org/api/function/user_mail_tokens
Roberto
--
http://speedtech.it
#11
subscribing
#12
issue in #3 still occurs in rc6 and dev,
patch in #10 solves the problem
#13
The same patch as #10 but now attached in CVS patch file against HEAD. May be this helps the maintainer to include it?
#14
Patch #13 worked for me.
#15
I too have tested this patch, and it works great. Seems like an absolute necessity to be added to the module. Hoping a maintainer can apply this patch soon and have it in rc7.
#16
Although I have not been able to reproduce the error I have committed the patch to HEAD and 6.x-1.x-dev. Thanks Roberto Gerola and com2.
#17
inserting manually the #13 code worked for me, couldn't get the patch to run properly. Probably just me not knowing how to apply patch.
#18
No need to apply the patch, use the latest 6.x-1.x-dev release. Please report your test results.
#19
I am running an already patched up version of simplenews, so I tried out the patch but it failed. Probably because my simplenews.module is already patched a couple of times. Anyway, I put the lines in manually where they are supposed to be and it works just like it should. Thanks
#20
I've upgraded to the dev edition, but although it's fixed !site, I'm still not seeing the values for !date and !login_uri.
I chucked in all the variables from the instructions below the Body field and the test email read:
[name] (the name of your website),http://[domain]/ (a link to your homepage),
[domain]/ (homepage link without the http://),
!date (today's date),
!login_uri (link to login page),
http://[domain]/newsletter/confirm/add/f04e1b96c60t22
(subscription confirmation link),
http://[domain]/newsletter/confirm/remove/f04e1b96c60t22
(unsubscription link),
http://[domain]/node/187 (link to this newsletter issue),
[name] newsletter (name of this newsletter series)
#21
I had problems with !mailto and !site in subscription confirmation email, and I can confirm the dev version fixes it.
#22
Same here as #21. The dev fixes this.
#23
Attached patch fixes adam_b's bug in #20. Patch applied to dev.
#24
Automatically closed -- issue fixed for 2 weeks with no activity.