Disbaling and uninstalling pathauto removes this notice. With pathauto enabled, the function:

/**
 * Implements hook_tokens().
 */
function uuid_tokens($type, $tokens, array $data = array(), array $options = array()) {

Is called three times. First for 'entity', and then twice for 'term'. The first time through with 'term', everything is fine. The second time through with 'term' the following case in the switch causes the notice:

    case 'term':
      $term = $data['term'];
      foreach ($tokens as $name => $original) {
        if ($name == 'uuid') {
         $replacements[$original] = $term->uuid;
        }
      }
      break;

There is no $data['term'] -- there is only $data['taxonomy_term'] (the first time through there is both $data['term'] and $data['taxonomy_term']). The follwoing fixes the problem:

    case 'term':
      if (isset($data['term'])) {
        $term = $data['term'];
        foreach ($tokens as $name => $original) {
          if ($name == 'uuid') {
           $replacements[$original] = $term->uuid;
          }
        }
      }
      break;

This bug occurs on a fresh install from about an hour ago using the recommended latest version of all modules as determined by drush.

Comments

dixon_’s picture

Status: Active » Closed (fixed)

Please use a later version of UUID module. The Token integration was completely rewritten in favor of a much more robust solution.

So this should not be a problem any more.

ryounes’s picture

There is no later release version. Are you saying that we should use the dev version?