Problem/Motivation

Token of a multivalue date field cannot be replaced with the actual field value at the moment. Token::findWithPrefix() fails to find a correct token as it gets confused by delta value of a multivalue date field.

Proposed resolution

As suggested by @Berdir, let's replace $tokens (delta value included) with $filtered_tokens (no delta value) as a parameter in Token::findWithPrefix() (token.tokens.inc:1686).

Remaining tasks

User interface changes

API changes

Data model changes

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Switched from using $tokens to $filtered_tokens as mentioned in the proposed resolution.

mbovan’s picture

Berdir’s picture

Status: Needs review » Needs work

Needs work for tests.

Berdir’s picture

Yay tests, showed that we also had a problem with just the :date property.

The last submitted patch, 5: fix_token_replacement-2884043-5-test-only.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • Berdir committed 45b6f6c on 8.x-1.x
    Issue #2884043 by mbovan, Berdir: Fix token replacement for multivalue...
Berdir’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.