I have the module working nicely, but get the following error as a popup on the status page.

Notice: Undefined index: label in entity_token_token_info_alter() (line 93 of /home/[site]/public_html/sites/all/modules/entity/entity_token.tokens.inc).
Notice: Undefined index: label in entity_token_token_info_alter() (line 99 of /home/[site]/public_html/sites/all/modules/entity/entity_token.tokens.inc).

Additionally, the status page reports the following as an alert:

Tokens	Problems detected
The following tokens or token types are missing required name and/or description information:
$info['tokens']['site']['current-page']

I've seen OG as a source of these errors, but I don't have OG installed on this site - any ideas? I've had to disable Path Breadcrumbs in the meantime for this site. (I have it woking on another site without incident - and I love it!)

Any assistance appreciated - thanks for the great module!

Comments

kalabro’s picture

I don't think it is PB problem. Which versions of Token, Entity and Ctools are you using?

bcobin’s picture

Thank you for the quick response - much appreciated!

Token is 7.x-1.6, Entity is 7.x-1.6 and Ctools is 7.x-1.7, all of which are the latest release versions. Disabling PB eliminates the error - where do you think I should look?

Thanks again...

mcdoolz’s picture

So the error is on 93 and 99.
So let's have a look there.

foreach (entity_get_all_property_info($type) as $name => $property) {
      $name = str_replace('_', '-', $name);
      $property += array('type' => 'text', 'description' => $property['label']);
      $property_token_type = _entity_token_map_to_token_type($property);

      if (!isset($info['tokens'][$token_type][$name]) && $property_token_type) {

        $info['tokens'][$token_type][$name] = array(
          'name' => $property['label'],
          'description' => $property['description'],

Adding a dpm calls forth these:

... (Array, 6 elements)
Krumo version 0.2.1a | http://krumo.sourceforge.net Click to expand. Double-click to show path. Called from /media/mcdoolz/Projects/html/thssa/sites/all/modules/contrib/entity/entity_token.tokens.inc, line 93  
... (Array, 6 elements)
label (String, 21 characters ) Path Breadcrumbs join
description (String, 39 characters ) All parent terms (for Path Breadcrumbs)
getter callback (String, 38 characters ) path_breadcrumbs_entity_get_properties | (Callback) path_breadcrumbs_entity_get_properties();
type (String, 6 characters ) struct
property info (Array, 3 elements)
computed (Boolean) TRUE
Krumo version 0.2.1a | http://krumo.sourceforge.net Click to expand. Double-click to show path. Called from /media/mcdoolz/Projects/html/thssa/sites/all/modules/contrib/entity/entity_token.tokens.inc, line 93  
... (Array, 1 element)
property info (Array, 2 elements)
menu_link (Array, 6 elements)
label (String, 9 characters ) Menu link
description (String, 9 characters ) Menu link
getter callback (String, 38 characters ) path_breadcrumbs_entity_get_properties | (Callback) path_breadcrumbs_entity_get_properties();
type (String, 6 characters ) struct
property info (Array, 5 elements)
computed (Boolean) TRUE
path_menu_trail (Array, 6 elements)
label (String, 15 characters ) Path menu trail
description (String, 26 characters ) Expands menu trail by path
getter callback (String, 38 characters ) path_breadcrumbs_entity_get_properties | (Callback) path_breadcrumbs_entity_get_properties();
type (String, 6 characters ) struct
property info (Array, 1 element)
computed (Boolean) TRUE
Krumo version 0.2.1a | http://krumo.sourceforge.net Click to expand. Double-click to show path. Called from /media/mcdoolz/Projects/html/thssa/sites/all/modules/contrib/entity/entity_token.tokens.inc, line 93  

K that looks like crap, but basically we have code that wants $property['label'] but ['label'] is suddenly located under ['path_menu_trail'].
¯\_(ツ)_/¯

So we need to recursively search the property for the label? If I put something together, maybe I'll upload my first patch evarrr.