I haven't yet been able to track this down. On a variety of sites for months now we get "n/a" instead of the comment-body token periodically and without pattern that I can find.
I see it on sites where the notifications are coming from "content type in group" and on sites where the notification is from "content type."
There are some old issues about this, though I'm not sure how relevant they are now because they are from 1 year plus and often relate tot he 5.x version.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 717246_na_instead_of_token.patch | 783 bytes | greggles |
Comments
Comment #1
gregglesOn one of the sites I maintain this has become 100% consistent and is happening on every mail. Hopefully I'll have some more data on it soon.
Comment #2
gregglesThe problem is in token_comment.inc
It does a check_markup on the content and if the user running cron doesn't have access to the filter then it gets replaced with N/A.
I think this should be fixed in token_comment, but leave this here for a moment so you can comment on it.
Comment #3
jose reyero commented@greggles, thanks, I think you're right, this is a token module issue.
Have yoiu posted it to token module or should we move the issue?
As a side note, Notifications 4.x now does user switching to anonymous before running a manual queue process that should help testing this one.
Comment #4
gregglesNot yet - wanted to make sure you agreed on the cause.
Anyone in token care to review this prior to me committing it?
Comment #5
dave reidI'm not sure about this. Are there security implications with the patch?
Comment #6
dave reidNevermind. It probably makes a lot of sense. This is what comment.module does itself for search indexing.
Comment #7
gregglesCommitted to 6.x - http://drupal.org/cvs?commit=352626
Here's the 7.x code:
But in fact the signature of check_markup has changed and the responsibility to check permissions is now at the submit stage rather than the render stage, which I think makes a lot more sense: http://api.drupal.org/api/function/check_markup/7