Wrong token type used for taxonomy terms

Created on 27 October 2023, about 2 years ago
Updated 25 April 2024, over 1 year ago

Problem/Motivation

In scheduler.token.inc, the tokens are generated using the entity type id. The entity type id is not always the same as the token type id, e.g. for taxonomy terms the token type id is "term", but the entity type id is "taxonomy_term". So the tokens provided by scheduler can't be used with taxonomy terms (and other entity types where this is the case).

Steps to reproduce

Try to use the tokens provided by scheduler with taxonomy terms.

Proposed resolution

If the contributed token module is installed, use the token.entity_mapper service provided by that module to try and get the correct token type id with the entity type id used as a fallback.

Remaining tasks

  • Make the test fail for existing code
  • Fix tokens.inc
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany FeyP

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024