Twig vars between microdata tag content

Created on 28 February 2019, over 5 years ago
Updated 14 March 2023, over 1 year ago

I try to implement microdata tags in my event list view. Unfortunately I'm not able to set the correct startDate tags. I'm using the following code:

<div class="event-date" itemprop="startDate" content="{{ field_event_date_time|date("c") }}">

However the result is:

<div class="event-date" itemprop="startDate" content="00">

If I try to put the var {{ field_event_date_time|date("c") }} between <span></span> tags it works properly. Any ideas how to bypass this malfunction?

πŸ› Bug report
Status

Closed: cannot reproduce

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 25 minutes ago

Created by

πŸ‡¦πŸ‡ΉAustria wamboe

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.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Since it's been 4 months since the last request and we still need more information to move forward with this issue, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].

    Thanks!

Production build 0.71.5 2024