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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

caspervoogt’s picture

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

mtoscano’s picture

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

mattwmc’s picture

Same for me. None of the URL tokens are working in a block I am trying to put them in.

tyler-durden’s picture

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

darvanen’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)
FileSize
57.43 KB
44.38 KB

I 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"?

darvanen’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

I suspect the issue here is the filter was not enabled in the input format. Please re-open if I am wrong.

mattwmc’s picture

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

darvanen’s picture

I 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 :)