solspace / craft-calendar

Calendar for Craft: The most reliable and powerful event management plugin for Craft.
http://docs.solspace.com/craft/calendar/v5
Other
15 stars 16 forks source link

4.0.4 Ordering Issues #203

Closed phillipsandoveracademy closed 1 year ago

phillipsandoveracademy commented 1 year ago

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

  1. Upgrade to 4.04
  2. Order events query by date

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 %}

rhysmatthew commented 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.

kjmartens commented 1 year ago

Very sorry for this issue @phillipsandoveracademy and @rhysmatthew. We'll get this fixed shortly. 🙂

kjmartens commented 1 year ago

This has now been resolved in Calendar 4.0.5. 🙂