Forum

Thread tagged as: Problem, Events

Event Sort by Time Bug

Apparent bug with time not in order. https://forum.grabaperch.com/forum/11-17-2014-event-app-19-calendar-view-order-by-datetime

Time lists correctly with perch_events_custom but not with perch_events_calendar(); perch_events_listing();

Here are some samples with its code.

Calendar

<?php 

$opts = array(
'past-events'=>true,
'calendar-template'=>'events/calendar/calendar.html',
'blank-day-template'=>'events/calendar/blank-day.html',
'event-day-template'=>'events/calendar/event-day.html'
);

perch_events_calendar($opts);
?>  

Debug message on this page shows

Debug Message
SELECT DISTINCT e.* FROM perch2_events e WHERE 1=1 AND MONTH(eventDateTime)='01' AND YEAR(eventDateTime)='2015'
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Using template: /templates/events/calendar/calendar.html
Using template: /templates/events/calendar/event-day.html
Using template: /templates/events/calendar/blank-day.html
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='299'
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='297'

Listing

<?php

$opts = array(
'past-events' =>true,
'filter'=>'eventDateTime',
'match'=>'gte',
'value'=>date('Y-m-d'),
'count'=>100,
'sort'=>'eventDateTime',
'sort-order'=>'ASC',
'calendar-template' => 'events/listing/calendar.html',
'blank-day-template' => 'events/listing/blank-day.html',
'event-day-template' => 'events/listing/event-day.html'
);

perch_events_listing($opts);
?>

Debug message on this page shows

Debug Message
SELECT DISTINCT e.* FROM perch2_events e WHERE 1=1 AND MONTH(eventDateTime)='01' AND YEAR(eventDateTime)='2015'
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Using template: /templates/events/listing/calendar.html
Using template: /templates/events/listing/event-day.html
Using template: /templates/events/listing/blank-day.html
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='299'
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='297'Debug Message
SELECT DISTINCT e.* FROM perch2_events e WHERE 1=1 AND MONTH(eventDateTime)='01' AND YEAR(eventDateTime)='2015'
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Using template: /templates/events/listing/calendar.html
Using template: /templates/events/listing/event-day.html
Using template: /templates/events/listing/blank-day.html
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='299'
SELECT c.* FROM perch2_events_categories c, perch2_events_to_categories e2c WHERE c.categoryID=e2c.categoryID AND e2c.eventID='297'
Scott Gruber

Scott Gruber 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, this is a known issue. Not eta on a fix, I'm afraid.

No problem.

Is this issue ever going to be fixed?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Mostly likely when the app is replaced, yes.

Sorry, my question was not couched properly. I wanted to know, if you could give me a rough date when the events app will be updated with a fix for this issue.