Event plug-in partially broken after GRAV update

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 %}
            &nbsp;
    				{% 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 %}

---

I think you should post your questions here: https://github.com/kalebheitzman/grav-plugin-events/issues

Well, I have posted several requests there and it seems the author has no time to reply for few weeks. :frowning:

@rhukster
I think there may be an issue with taxonomy. I had an issue with my blog pages not displaying in the list view. The individual items displayed fine, just the parent page broke. I had to change my frontmatter to get it to work. Luckily my blog articles were all children.

Broken

content:
    items:
        - '@taxonomy':
            category: [blog, featured]

Working

content:
    items:
        - '@self.children'

I created an issue here: https://github.com/getgrav/grav/issues/1222

I’ll look into it, thanks.

@Ryan the first page header will search posts with both categories (blog AND featured). Is that what you’re expecting? I tested and that works.

@flaviocopes Using taxonomy to find ‘blog’ and ‘featured’ pages was working in Grav 1.1.3 and 1.1.8. When I updated to Grav 1.1.9, the article list page rendered correctly but it did not contain any posts. I could go to any post directly. I got the same result on OSX with PHP 7.1, Fedora 24 with PHP 5.6, and Fedora 25 with PHP 7.0. I manage 8 very similar Grav sites that have been running since summer. They all show the same issue with the 1.1.9 update.

I hit the forums to see if anyone else was having the same issue since the update. It seems to be related that @peterwhitewolfsix is having an issue with the unrelated events plugin that also uses taxonomy.

/user/pages/online-mba-blog/blog.md Frontmatter

menu: 'Online MBA Blog'
title: 'Online MBA Blog'
metadata:
    description: 'Read about MBA topics, learn tips and tricks, peruse infographics and watch videos on our thought leadership pages.'
    robots: 'index, follow'
routes:
    canonical: '/online-mba-blog'

blog_url: 'online-mba-blog'
sitemap:
    changefreq: weekly
content:
    items: 
        - '@self.children'
    order:
        by: date
        dir: desc
    limit: 10
    pagination: true
feed:
    description: 'Online MBA Blog'
    limit: 10
pagination: true
sidebar:
    type: blog

show_hero: true

/user/pages/online-mba-blog/what-to-look-for-in-an-online-mba/item.md Frontmatter

title: 'What to Look for in an Online MBA Program'
date: '27-03-2016 17:34'
summary:
    enabled: '1'
    format: short
taxonomy:
    tag:
        - Decision
    category:
        - blog
routes:
    canonical: '/online-mba-blog/what-to-look-for-in-an-online-mba'

Ryan, this is exactly what I experienced in Event plug-in after update to latest grav. I’ve got empty events page instead list of events.