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 tokens do not work, and actually break other tokens. You can see this in the status report.
Two things to fix this:
- In taxonomy_title.module remove
taxonomy_title_hook_info()
. The documentation makes it look like you need it, buttoken_info
andtokens
get registered in system.api.php. - The attached file implements the correct hooks.
Comment | File | Size | Author |
---|---|---|---|
#2 | update_tokens-1356518-2.patch | 2.76 KB | jenlampton |
taxonomy_title.tokens.inc_.txt | 1.5 KB | Andrew Penry |
Comments
Comment #1
jenlamptonHi Andrew,
Thanks for the feedback. This is not a critical issue, since the module is still in 'dev' that means we're still working out issues like this. I'll look over your code and try to incorporate it when I have time, but please see http://drupal.org/patch/submit on submitting patches. You'll find that changes will get in to modules much faster if you can provide patches, since that makes it much easier for us to make the same change on the working branch. :)
Comment #2
jenlamptonThanks for the code sample. This has proven very helpful in cleaning up the tokens and getting them working for D7 :)
You should check out Drupal's coding standards for Drupal syntax relating especially to including closing php tags (don't use them) and soft tabs (two spaces).
Attached is a patch that updates this module's use of tokens.
Comment #3
jenlamptonI'm committing these tokens. Please re-open if they don't work for you.