If you use a token that contains a node_reference field that has unlimited or multiple values allowed, the token doesn't work. Anyway for this to happen? Maybe take the first in the list?

Comments

MGN’s picture

Category: bug » support

this sounds like it may be an issue for the token issue queue. But perhaps I need more information to understand the issue. Custom breadcrumbs just makes use of whatever information is provided by the token, it doesn't modify or otherwise process the values returned by tokens. If i understand the suggestion, you might need to create your own token to "take the first in the list" and then use it in custom breadcrumbs.

skizzo’s picture

@Canadaka: I have a reference field (field_section) with 3 hierarchical taxonomy terms. When editing a breadcrumb and expanding the tokens list I see two expandable entries, reading:

Section	[node:field_section]	Term reference field.
Section	[node:field-section]	Field "field_section".

clicking either one, the second one will expand giving access to such tokens as "The unique ID of the taxonomy term", "The parent term of the taxonomy term, if one exists." etc... Please note that for unknown reasons I recently stopped seeing the second item (the first was still there but would provide only the basic unstructured token), the second token came back when I tried to update the "entity" and "token" module to latest -dev version.

amsterdamdrupalnewbie’s picture

I have the same problem as skizzo. Everything was fine and then I started only seeing basic unstructured token. I will try updating "entity" and "token" modules to dev releases and see if this fixes it.

amsterdamdrupalnewbie’s picture

didn't work for me in fact I lost the list of tokens on the custom breadcrumbs page - any ideas?

skizzo’s picture

Not a requirement, but have you tried to force the token output?
If that does not work you may want to move to the token issues queue.
See also http://drupal.org/node/1332044

klucid’s picture

Status: Active » Closed (works as designed)

I know this is an old issue, but it's working for me.

Example: for Organic Groups I have been using [node:og-group-ref:0:nid] successfully. I believe the key is the "0" and if only a single value is allowed, this should be omitted.