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

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new785 bytes
new785 bytes

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

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new4.84 KB
new6.21 KB

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.