This is a very strange situation as the GRAV update has partially broken event plug-in. After reversing the update, everything is ok. It doesn’t work in parsing the events and displaying them on an event page, events.html.twig:
{% embed 'partials/base.html.twig' %}
{# get the featured events #}
{% set featured_events =
page.collection({
'items': {
'@taxonomy': {
'type': 'event',
'category': 'featured'
}
},
'dateRange': {
'start': datetools.today|date('m/d/Y'),
'end': datetools.parseDate('+12 month')|date('m/d/Y')
},
'order': {
'by': 'date',
'dir': 'asc'
},
'limit': 20
})
%}
{# get events by taxonomy #}
{% set events =
page.collection({
'items': {
'@taxonomy': {
'type': 'event',
}
},
'dateRange': {
'start': datetools.today|date('m/d/Y'),
'end': datetools.parseDate('+1 month')|date('m/d/Y')
},
'order': {
'by': 'date',
'dir': 'asc'
},
'limit': 20,
'pagination': true
})
%}
{% block content %}
<div class="events-container">
<header>
<div class="container">
<div class="intro-text">
{{ content }}
{% for button in page.header.buttons %}
<a class="page-scroll btn btn-xl" href="{{ button.url }}">{{ button.text }}</a>
{% endfor %}
</div>
</div>
</header>
<section class="featured-events">
{% for event in featured_events %}
<article class="featured-event">
<div class="featured-event-masthead">
{% set image = event.media.images|first %}
{% if image != null %}
{{ image.cropZoom(1200,400).html }}
{% endif %}
<h3 class="featured-event-title"><a href="{{ event.url }}">{{ event.title }}</a></h3>
</div>
<div class="featured-event-content">
<ul class="event-meta-information">
<li class="when"><i class="fa fa-calendar"></i> {{ event.header.event.start|date(J, d) }}</li>
{% if event.header.event.location %}
<li class="where"><i class="fa fa-location-arrow"></i> {{ event.header.event.location }}</li>
{% endif %}
</ul>
{{ event.summary(200) }}
<p>
<a href="{{ event.url }}" class="event-button">{{ 'PLUGIN_EVENTS.EVENTS.BUTTON'|t }}</a>
</p>
</div>
</article>
{% endfor %}
</section>
<section class="events-listing">
{% for item in events %}
<article class="event-item">
<div class="event-image">
{% set image = item.media.images|first %}
{% if image != null %}
<a href="{{ item.url }}">{{ image.cropZoom(512,512).html }}</a>
{% else %}
{% endif %}
</div>
<section class="event-content">
<h3>{{ item.title }}</h3>
<div class="event-meta">
<ul>
<li class="when"><i class="fa fa-calendar"></i> {{ item.header.event.start|date(J, d) }}</li>
{% if item.header.event.location %}
<li class="where"><i class="fa fa-location-arrow"></i> {{ item.header.event.location }}</li>
{% endif %}
</ul>
<a href="{{ item.url }}" class="event-button">{{ 'PLUGIN_EVENTS.EVENTS.BUTTON'|t }}</a>
</div>
<div class="event-summary">
{{ item.summary(250) }}
</div>
</section>
</article>
{% endfor %}
</section>
</div>
{# Render the pagination list #}
{% if config.plugins.pagination.enabled and events.params.pagination %}
{% include 'partials/pagination.html.twig' with {'base_url':page.url, 'pagination':collection.params.pagination} %}
{% endif %}
{% endblock %}
{% endembed %}
---