Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: guDa commentedBy the way, it works well with previous version of Token.
Comment #2
Code Rader CreditAttribution: Code Rader commentedSame Here
Comment #3
sugarbase CreditAttribution: sugarbase commentedSame for me too.
Comment #4
broncomania CreditAttribution: broncomania commentedSame here
Comment #5
roball CreditAttribution: 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 CreditAttribution: guDa commentedI tried -dev but I didn't get any debugging information.
Comment #8
Dane Powell CreditAttribution: Dane Powell 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 CreditAttribution: drewhutchinson commentedSame issue. Tokens not working with SMTP emails.
Comment #10
chrisal CreditAttribution: chrisal commentedSame for our site
Comment #11
svinod999 CreditAttribution: svinod999 commentedsame problem faced... subscribing...
Comment #13
roball CreditAttribution: roball commentedComment #14
ehanuise CreditAttribution: 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 CreditAttribution: chrisal commentedEverything is now OK with new release 6.x-1.18
Comment #18
guDa CreditAttribution: 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 CreditAttribution: 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
Dane Powell CreditAttribution: Dane Powell 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
Dane Powell CreditAttribution: Dane Powell commentedDoh... simulpost. I think this is supposed to be "fixed"...