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.
I see that a global token like [site:name] works. I'm trying to creating a link to an author's personal contact form. [node:author] and [uid] are not working - is that the expected behavior?
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2018-03-26 at 12.56.07 pm.png | 44.38 KB | darvanen |
#5 | Screen Shot 2018-03-26 at 12.55.22 pm.png | 57.43 KB | darvanen |
Comments
Comment #1
caspervoogt CreditAttribution: caspervoogt at Plethora commentedI would guess that if [site:name] works but another token does not (in the same spot) your issue is not with Token Filter but with Token, or with something else.
Comment #2
mtoscano CreditAttribution: mtoscano commentedI have the same issue: [node:author], [node:created], [node:url:absolute] does not work and [current-page:url], [site:name], [current-page:title] works.
What can be the problem with Token, as Token has no configuration?
Comment #3
mattwmc CreditAttribution: mattwmc commentedSame for me. None of the URL tokens are working in a block I am trying to put them in.
Comment #4
tyler-durden CreditAttribution: tyler-durden commentedI am also unable to access the node author, I have tried numerous combinations. I'm not usre of the context to pull the node ID as well, which I need. [Node:Title] works just fine for me.
In some other areas of Drupal, I believe using Display Suite, you are able to click a link which pulls up all available tokens available that work. Could that be an option added to this module? Or at least document some of the main ones?
Comment #5
darvanenI just tested the tokens mentioned above on a fresh install of D7 with Standard profile and Token Filter installed:
Where are you trying to use the tokens? In what context? What exactly do you mean by "not working"?
Comment #6
darvanenI suspect the issue here is the filter was not enabled in the input format. Please re-open if I am wrong.
Comment #7
mattwmc CreditAttribution: mattwmc commentedI think it may be a duplicate of this: https://www.drupal.org/forum/support/post-installation/2012-03-22/using-...
Node tokens in blocks isn't working for me.
Example, I am trying to have a custom block "submitted" to be displayed on nodes using [node:author] and [node:created]. I also do have the tokens option check marked for the input format.
Update: Managed to do it with a View.
Comment #8
darvanenI think what you're coming up against there @mattwmc, is that the block is missing the context required to process a node token.
You cannot use *node* tokens in *blocks*.
One way to test whether something is wrong with how this module is working is to try the same tokens in the title of the entity you are creating (whether it is a block, node, taxonomy item or whatever). If the title translates the token properly but the body doesn't, *then* the problem is more than likely within this module :)