Closed phillipsandoveracademy closed 1 year ago
I second this, our team noticed an ordering issue after updating to 4.04. We've rollbacked to 4.02. Thanks @phillipsandoveracademy for adding this here.
Very sorry for this issue @phillipsandoveracademy and @rhysmatthew. We'll get this fixed shortly. 🙂
This has now been resolved in Calendar 4.0.5. 🙂
Describe the bug or issue you're experiencing
Upon upgrading from 4.0.2 -> 4.04, the order of calendar events via query cannot be ordered by date between now and June 2023.
Steps to reproduce
Expected behavior
The current code that worked in 4.0.2 ordered events between today and 600 days. Upgrading to 4.0.4, the events are out of order.
Craft & Plugin Info (please complete the following information):
Additional context
Simplified code: {% set sparams = craft.app.request.getQueryParam('q') %}
{% set targetStartDate = 'today' %} {% set targetEndDate = '600 days' %} {% set eventOptions = { rangeStart: targetStartDate, rangeEnd: targetEndDate, limit: targetLimit, relatedTo: catArray, search: sparams ? "title:"~sparams : null } %} {% set eventListQuery = craft.calendar.events( eventOptions ) %}
{% paginate eventListQuery as pageInfo, events %} {% for event in events %} {{ event.title }}, {{ event.startDate|date("Y-m-d") }} {% endfor %}