Calendar 1.0.{2|3} Event Display - More in [Cal] sidebar block

Following on from https://nixfifty.com/threads/1-0-1-more-sidebar-blocks-when-viewing-an-event.7203/, the "More in [Cal]" sidebar block is still showing oldest events first when retrieving past events ...

Screen Shot 2018-06-28 at 11.20.40.png

In this example/screenshot, the top event is correctly an upcoming event (there is only two, itself and the one shown), but when showing the past events below the top one, the oldest events are chosen/shown first. It should be the most recent/newest past events, after the upcoming event(s).
 
I've made some improvements here to handle more edge cases but there may be more that I'm not considering. Let me know if it persists in the next version and also include out-of-sync events and their details (start, end, recurring options) and I'll have a look.
 
Let me know if it persists in the next version
Yes, still an issue in 1.0.3 ....

Screen Shot 2018-07-02 at 11.24.18.png

You can see at the top of the list is the oldest event, working down the list by date ascending. This is of no use to anyone, showing very old events. It should be, from the top of the list, upcoming events ASCending and then, if sidebar block space allows, past events DESCending. Thus, in the example above where there is no upcoming events (other than the event being displayed, event_id = 2711) I would expect to see the next top 5 in this list, starting with "Adventure Ride Around Australia" at the top of the sidebar block ...

Code:
mysql> select event_id, from_unixtime(start_date), event_title from xf_nf_calendar_event where calendar_id = 9 order by start_date DESC;
+----------+---------------------------+-------------------------------------------------------+
| event_id | from_unixtime(start_date) | event_title                                           |
+----------+---------------------------+-------------------------------------------------------+
|     2711 | 2019-03-09 00:00:00       | Jindy 2019 - The Sexennial Anniversary                |
|     2453 | 2017-07-01 15:03:22       | Adventure Ride Around Australia                       |
|     1710 | 2012-04-14 00:00:00       | [National] Psychs on Bikes                            |
|     1667 | 2011-03-25 00:00:00       | [National] Annual Tintaldra Ride                      |
|     1615 | 2010-11-13 00:00:00       | [National] MA - 1st Annual Signature Tour             |
|     1624 | 2010-09-11 00:00:00       | [National] Black Dog Ride to the Red Centre           |
|     1531 | 2010-03-26 00:00:00       | [National] Annual Tintaldra Ride                      |
|     1566 | 2010-03-06 00:00:00       | [National] National NetRider Meet - Jindabyne         |
|     1340 | 2009-10-31 00:00:00       | [National] 4 Musketeers, 2009                         |
|     1348 | 2009-10-03 00:00:00       | [National] Postie Bike Challenge                      |
|     1484 | 2009-09-27 00:00:00       | [National] Charity Ride on a Scooter across Australia |
|     1460 | 2009-06-08 00:00:00       | [National] W/end ride through VIC/NSW                 |
|     1225 | 2008-11-28 00:00:00       | [National] Suzuki GSX1400 National Rally              |
|     1230 | 2008-11-01 00:00:00       | [National] 4 Musketeers - 4th Generation              |
|      465 | 2006-09-05 00:00:00       | [National] Postie Bike Challenge - Brisbane to Alice  |
|      381 | 2006-09-02 00:00:00       | [Aust Wide] Postie Bike Challenge                     |
|      197 | 2005-09-03 00:00:00       | Postie Bike Challenge                                 |
|      162 | 2005-03-12 00:00:00       | The Great Alpine Tour                                 |
+----------+---------------------------+-------------------------------------------------------+

This is the same issue for the "More From [User]" sidebar block too.
 
Last edited:
Yes, still an issue in 1.0.3 ....

View attachment 811

You can see at the top of the list is the oldest event, working down the list by date ascending. This is of no use to anyone, showing very old events. It should be, from the top of the lists, upcoming events ASCending and then, if sidebar block space allows, past events DESCending. Thus, in the example above where there is no upcoming events (other than the event being displayed, event_id = 2711) I would expect to see the next top 5 in this list, starting with "Adventure Ride Around Australia" at the top of the sidebar block ...

Code:
mysql> select event_id, from_unixtime(start_date), event_title from xf_nf_calendar_event where calendar_id = 9 order by start_date DESC;
+----------+---------------------------+-------------------------------------------------------+
| event_id | from_unixtime(start_date) | event_title                                           |
+----------+---------------------------+-------------------------------------------------------+
|     2711 | 2019-03-09 00:00:00       | Jindy 2019 - The Sexennial Anniversary                |
|     2453 | 2017-07-01 15:03:22       | Adventure Ride Around Australia                       |
|     1710 | 2012-04-14 00:00:00       | [National] Psychs on Bikes                            |
|     1667 | 2011-03-25 00:00:00       | [National] Annual Tintaldra Ride                      |
|     1615 | 2010-11-13 00:00:00       | [National] MA - 1st Annual Signature Tour             |
|     1624 | 2010-09-11 00:00:00       | [National] Black Dog Ride to the Red Centre           |
|     1531 | 2010-03-26 00:00:00       | [National] Annual Tintaldra Ride                      |
|     1566 | 2010-03-06 00:00:00       | [National] National NetRider Meet - Jindabyne         |
|     1340 | 2009-10-31 00:00:00       | [National] 4 Musketeers, 2009                         |
|     1348 | 2009-10-03 00:00:00       | [National] Postie Bike Challenge                      |
|     1484 | 2009-09-27 00:00:00       | [National] Charity Ride on a Scooter across Australia |
|     1460 | 2009-06-08 00:00:00       | [National] W/end ride through VIC/NSW                 |
|     1225 | 2008-11-28 00:00:00       | [National] Suzuki GSX1400 National Rally              |
|     1230 | 2008-11-01 00:00:00       | [National] 4 Musketeers - 4th Generation              |
|      465 | 2006-09-05 00:00:00       | [National] Postie Bike Challenge - Brisbane to Alice  |
|      381 | 2006-09-02 00:00:00       | [Aust Wide] Postie Bike Challenge                     |
|      197 | 2005-09-03 00:00:00       | Postie Bike Challenge                                 |
|      162 | 2005-03-12 00:00:00       | The Great Alpine Tour                                 |
+----------+---------------------------+-------------------------------------------------------+

This is the same issue for the "More From [User]" sidebar block too.
Are these events recurring? Could you get me the end_date and recurring_options field values too please? It'd help to generate a proper test case so I can see why it's being whacky. Thanks!
 
Are these events recurring? Could you get me the end_date and recurring_options field values too please? It'd help to generate a proper test case so I can see why it's being whacky. Thanks!
No, none of these are recurring.

Code:
mysql> select event_id, from_unixtime(start_date), from_unixtime(end_date), recurring_options, event_title from xf_nf_calendar_event where calendar_id = 9 order by start_date DESC;
+----------+---------------------------+-------------------------+-------------------+-------------------------------------------------------+
| event_id | from_unixtime(start_date) | from_unixtime(end_date) | recurring_options | event_title                                           |
+----------+---------------------------+-------------------------+-------------------+-------------------------------------------------------+
|     2711 | 2019-03-09 00:00:00       | 2019-03-12 23:30:00     | []                | Jindy 2019 - The Sexennial Anniversary                |
|     2453 | 2017-07-01 15:03:22       | 2017-07-01 15:03:22     | []                | Adventure Ride Around Australia                       |
|     1710 | 2012-04-14 00:00:00       | 2012-04-14 23:59:59     |                   | [National] Psychs on Bikes                            |
|     1667 | 2011-03-25 00:00:00       | 2011-03-25 23:59:59     |                   | [National] Annual Tintaldra Ride                      |
|     1615 | 2010-11-13 00:00:00       | 2010-11-13 23:59:59     |                   | [National] MA - 1st Annual Signature Tour             |
|     1624 | 2010-09-11 00:00:00       | 2010-09-11 23:59:59     |                   | [National] Black Dog Ride to the Red Centre           |
|     1531 | 2010-03-26 00:00:00       | 2010-03-26 23:59:59     |                   | [National] Annual Tintaldra Ride                      |
|     1566 | 2010-03-06 00:00:00       | 2010-03-06 23:59:59     |                   | [National] National NetRider Meet - Jindabyne         |
|     1340 | 2009-10-31 00:00:00       | 2009-10-31 23:59:59     |                   | [National] 4 Musketeers, 2009                         |
|     1348 | 2009-10-03 00:00:00       | 2009-10-03 23:59:59     |                   | [National] Postie Bike Challenge                      |
|     1484 | 2009-09-27 00:00:00       | 2009-09-27 23:59:59     |                   | [National] Charity Ride on a Scooter across Australia |
|     1460 | 2009-06-08 00:00:00       | 2009-06-08 23:59:59     |                   | [National] W/end ride through VIC/NSW                 |
|     1225 | 2008-11-28 00:00:00       | 2008-11-28 23:59:59     |                   | [National] Suzuki GSX1400 National Rally              |
|     1230 | 2008-11-01 00:00:00       | 2008-11-01 23:59:59     |                   | [National] 4 Musketeers - 4th Generation              |
|      465 | 2006-09-05 00:00:00       | 2006-09-05 23:59:59     |                   | [National] Postie Bike Challenge - Brisbane to Alice  |
|      381 | 2006-09-02 00:00:00       | 2006-09-02 23:59:59     |                   | [Aust Wide] Postie Bike Challenge                     |
|      197 | 2005-09-03 00:00:00       | 2005-09-03 23:59:59     |                   | Postie Bike Challenge                                 |
|      162 | 2005-03-12 00:00:00       | 2005-03-12 23:59:59     |                   | The Great Alpine Tour                                 |
+----------+---------------------------+-------------------------+-------------------+-------------------------------------------------------+
18 rows in set (0.00 sec)
 
I think I've identified the cause of this. Just doing some more testing to be sure this time. :D
 
Back
Top