Improve default value filter to work on non-existing list items

Created on 22 January 2016, over 8 years ago
Updated 24 June 2024, 4 days ago

Coming from #2654892: Allow using data filters in placeholder tokens β†’ :

The default value currently only works if no "missing data" exception is thrown, but this happens if you want to do node:field_multiple:4|default('some') for a not existing field value. So we should catch those exceptions and pass on NULL to filters allowing NULL input.

For that to work, we'll also need the possibility to apply the property path on definitions only. That way we can catch the missing data exception of e.g. node:field_multi:3:value because the 4th item is not set, but then fetch the definition of node:field_multi:3:value and pass it on to the default filter. That way, the filter knows the target data type.

πŸ“Œ Task
Status

Active

Version

2.1

Component

Data filters

Created by

πŸ‡¦πŸ‡ΉAustria fago Vienna

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024