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.
The [term], [term-id], [vocab], [vocab-id] tokens will not show data, if node taxonomy contains integers instead of taxonomy object after node edited.
Small patch for token_node.inc (attached here) can solve this problem.
Comment | File | Size | Author |
---|---|---|---|
token_node.inc_.patch | 475 bytes | mlarini | |
Comments
Comment #1
Zach Harkey CreditAttribution: Zach Harkey commented[term] definitely does not work in some cases. But after applying this patch I received the following error:
Comment #2
c_philip CreditAttribution: c_philip commentedI've tried to reference the taxonomy terms and it doesn't work either. Also I tried the patch and that still gives me the same error the other user gave. Any help with fixing this problem would be greatly appreciated because I have several nodes where the titles are generate based on taxonomy names.
Comment #3
gregglesthere was a patch I submitted a little while ago which should make the term tokens more consistent. You will need to set a "heavy" weight on your module (e.g. 1). Can you try out the code from cvs head and see if it works for you? If so we'll probably roll a 1.7 version of token soon.
thanks!
Comment #4
gregglesThis seems like a duplicate of http://drupal.org/node/137669