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

guDa’s picture

By the way, it works well with previous version of Token.

Code Rader’s picture

Same Here

sugarbase’s picture

Same for me too.

broncomania’s picture

Same here

roball’s picture

Category: support » bug

#1329196: Rules integration broke in 6.x-1.17 is a duplicate of this issue.

Dave Reid’s picture

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

guDa’s picture

I tried -dev but I didn't get any debugging information.

Dane Powell’s picture

Priority: Normal » Major

Same 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

drewhutchinson’s picture

Same issue. Tokens not working with SMTP emails.

chrisal’s picture

Same for our site

svinod999’s picture

same problem faced... subscribing...

roball’s picture

Component: User interface » Code
ehanuise’s picture

same here, subscribing

Anybody’s picture

Same here, subscribing.

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

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

chrisal’s picture

Everything is now OK with new release 6.x-1.18

guDa’s picture

Confirming #17. 6.x-1.18 is working. But 6.x.-1.x-dev has same problem.

Dave Reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

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

martn’s picture

Version: 6.x-1.17 » 6.x-1.18
Status: Fixed » Needs work

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

Dane Powell’s picture

Status: Needs work » Fixed

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

Dave Reid’s picture

Status: Fixed » Needs work

This has been addressed in the 6.x-1.x-dev.

Dane Powell’s picture

Status: Needs work » Fixed

Doh... simulpost. I think this is supposed to be "fixed"...

Status: Fixed » Closed (fixed)

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