Closed (fixed)
Project:
Token
Version:
6.x-1.18
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2011 at 21:13 UTC
Updated:
23 Nov 2011 at 17:00 UTC
hi,
I updated token module today. After updating the module, token replacements don't work for e-mail notifications like new comment, node update etc. Mails come like that:
Comment for [type-name]: [title]
Comment by [comment-author-name]: [comment-title]
[comment-body]
Read more [comment-url]
How to solve this problem?
Comments
Comment #1
guDa commentedBy the way, it works well with previous version of Token.
Comment #2
code rader commentedSame Here
Comment #3
sugarbase commentedSame for me too.
Comment #4
broncomania commentedSame here
Comment #5
roball commented#1329196: Rules integration broke in 6.x-1.17 is a duplicate of this issue.
Comment #6
dave reidI have added some debugging code to 6.x-1.x-dev release that will help trace what function is responsible for calling this incorrectly. Please download the 6.x-1.x-dev release in about 12 hours to help me debug this further.
Comment #7
guDa commentedI tried -dev but I didn't get any debugging information.
Comment #8
danepowell commentedSame here, with latest stable releases of Notifications and Messaging. This is definitely major, maybe even critical.
For reference (and help in tracking down the root cause) here are the release notes and full changelog
Comment #9
drewhutchinson commentedSame issue. Tokens not working with SMTP emails.
Comment #10
chrisal commentedSame for our site
Comment #11
svinod999 commentedsame problem faced... subscribing...
Comment #13
roball commentedComment #14
ehanuise commentedsame here, subscribing
Comment #15
anybodySame here, subscribing.
Comment #16
dave reidEveryone knows that there is a bug green 'Subscribe' button at the top right of this issue right? Please use it. Thanks.
I have committed a follow-up with http://drupalcode.org/project/token.git/commit/f02c914 that will allow token replacement to still work with arrays but it will also still throw a notice because modules which call with an array still need to be fixed. I will reiterate that it was never supposed to be supported. It only worked by accident.
Please test out the 6.x-1.x-dev release in about 12 hours once it has had the chance to regenerate.
Comment #17
chrisal commentedEverything is now OK with new release 6.x-1.18
Comment #18
guDa commentedConfirming #17. 6.x-1.18 is working. But 6.x.-1.x-dev has same problem.
Comment #19
dave reidI highly doubt 6.x-1.x-dev would not be working. It's the same exact code as 6.x-1.18 right now, unless you didn't update the dev version again.
Comment #20
martn commentedWell not entirely for me. The notification messages works and integrate correctly the tokens, but each time there is a bunch of error messages generated:
user notice: The messaging_text_replace() function called token replacement with an array rather than a string for $text in /.../drupal-6.22/sites/all/modules/token/token.module on line 263.
Comment #21
danepowell commented@martn - Read Dave's post (#16). This is because Notifications/Messaging (or whatever module you are using) is not using Tokens correctly. Someone needs to open an issue in the appropriate queue to get that fixed.
Comment #22
dave reidThis has been addressed in the 6.x-1.x-dev.
Comment #23
danepowell commentedDoh... simulpost. I think this is supposed to be "fixed"...