- Issue created by @brian.barry@utexas.edu
- πΊπΈUnited States brian.barry@utexas.edu
Following up on this, I boiled it down to a minimal install.
Steps to reproduce
Install Drupal 10.3.10
Install module Smart Date 4.2.1
Install module Token 8.x-1.15
Install module Twig Tweak 3.4.0
Create content type with Smart Date field (field_when)
Insert code into node.html.twig template:value - {{ drupal_token('node:field_when:0:value', {node}) }}<br> format:default - {{ drupal_token('node:field_when:0:format:default', {node}) }}<br> value - {{ drupal_token('node:field_when:1:value', {node}) }}<br> format:default - {{ drupal_token('node:field_when:1:format:default', {node}) }}<br> value - {{ drupal_token('node:field_when:2:value', {node}) }}<br> format:default - {{ drupal_token('node:field_when:2:format:default', {node}) }}<br>
In this case I created a node with only two date values, but invoking a formatted token for delta 2, which is empty, still returns the value of delta 0.
value - 1733572800
format:default - Sat, Dec 7 2024, 6 - 7am
value - 1733659200
format:default - Sat, Dec 7 2024, 6 - 7am
value - [node:field_when:2:value]
format:default - Sat, Dec 7 2024, 6 - 7am