Using [node:field-trem:name] just doesn't work, it's interpreted in plain text.

If I use: [node:field-term] I have the following error:
Warning: Illegal offset type in _entity_token_get_token() (line 144 of (...)/sites/all/modules/entity/entity_token.tokens.inc).

Comments

Jerome F’s picture

Maybe because field tokens are not available yet?
http://drupal.org/node/691078

dave reid’s picture

Project: Token » Entity API
Component: Code » Code - misc

Your bug is with the entity module, not token module.

fago’s picture

Status: Active » Postponed (maintainer needs more info)

>Using [node:field-trem:name] just doesn't work, it's interpreted in plain text.

Of which field-type is "field-trem"?

Jerome F’s picture

It's in Node > Destination city (Field field_deal_destination_city) which is a Term reference field in my content type.
Sorry I should have written [node:field-[term_reference_field_machine_name]:name]

Name [node:field-deal-destination-city:name] The name of the taxonomy term.

Jerome F’s picture

Status: Postponed (maintainer needs more info) » Active
eileen’s picture

I'm getting the same error. It's driving me nuts.

Warning: Illegal offset type in _entity_token_get_token() (line 144 of (...) /sites/all/modules/entity/entity_token.tokens.inc).

How can I make it go away? (On a side note, I sure wish Drupal had a forum strictly for error messages and their solutions. Not weeks/years of comments and theories...just a forum strictly where ALL error messages are resolved.)

But I digress. Is there a known cure for this one?

mh86’s picture

I'm having the same issue when loading terms from a panels context.
In my case, $wrapper->value() returns the full term object and that's why $options_list[$wrapper->value()] doesn't work.

sun-fire’s picture

I have the same error. Subscribe.

fago’s picture

Status: Active » Closed (duplicate)

please try the patch in http://drupal.org/node/1155512#comment-4534394
Also, let's track this in the linked issue.