Problem/Motivation

Similar to the related issue: #3307176: Token is not cleared if none of the tokens produce a replacement
When using "Or" conditions at the beginning of a token, it doesn't evaluate the second set of tokens in the string. The use case would be generating the path auto pattern using different field conditions.

Steps to reproduce

Create 2 text fields on a node
set up the path auto pattern to be something like [node:field_foo|node:field_bar]/[node:title]
Create a node of that type, but leave the two fields empty.
Observe the issue
Edit the node, and populate either of the fields
Re-save and observe the pattern was applied correctly.

Proposed resolution

Treat each token set independently.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Issue fork token_or-3310504

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pookmish created an issue. See original summary.

pookmish’s picture

Status: Active » Needs review

pianomansam’s picture

Status: Needs review » Fixed

@pookmish wonderful work, yet again!

pookmish’s picture

Thanks for the fast turn around too!

Status: Fixed » Closed (fixed)

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