Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a field is used across multiple entities, such as a node and a profile, then the field token is only generated for the last entity in the list. The problem is in _token_field_info() where $info[$key]['labels'] and $info[$key]['bundles'] are initialised within the loop that is iterating over entities. Therefore $info[$key]['bundles'] are only stored for the last entity. These initialisations should be moved outside the entity loop.
Comments
Comment #1
Dave ReidFixed with 7.x-1.x.
http://drupalcode.org/project/token.git/commit/48370d9