Low events not showing past events
I have updated Low Events to v1.4.0 and now past events are not showing, below is the code I am using.
Has anything changed which would make this not work?
{exp:low_events:entries
channel="events"
disable="categories|category_fields|member_data"
limit="12"
show_active="no"
show_passed="yes"
show_upcoming="no"
pagination="both"
sort="desc"
unit="past"
}
Replies
Low 11 Feb 2015 07:42
Use unit="passed".
LE uses the unit and date parameters to determine the date range for events. The show_x parameters then exclude events of that type from the date range. The unit param defaults to upcoming, date defaults to today, the show_x params all default to yes.Valid units are: year, month, week, day, passed, active, upcoming, and all. Any other unit will fall back to the default.
The reason for "passed" rather than "past" is grammatical consistency: "Events that have/are X", where X is 'passed', 'active', or 'upcoming'. (rather than 'past' or 'future')
zizther 11 Feb 2015 11:31
Thanks Low.
Sorry, I am using passed instead of past, it was me inputting it incorrectly.
This shows the upcoming events correctly from the current date, as I am not using the date parameter.
{exp:low_events:entries
channel="events"
disable="categories|category_fields|member_data"
limit="12"
pagination="both"
show_active="yes"
show_passed="no"
show_upcoming="yes"
sort="asc"
unit="upcoming"
}
But if I change the unit to passed and swap the show parameters around it shows none of the past events. These previous events are from last year, I don't know if that makes a difference, which means I need to use date range.
Note I am also using the search parameter.
{exp:low_events:entries
channel="events"
disable="categories|category_fields|member_data"
limit="12"
pagination="both"
show_active="no"
show_passed="yes"
show_upcoming="no"
search:event_show_past="Yes"
sort="desc"
unit="passed"
}
I have tried adding a date range, but i still couldn't get anything showing
This method worked before I updated, I didn't know if something had changed in v1.4.0
Low 11 Feb 2015 11:37
Have you set the events field to overwrite the entry's expiration date? If so, you might need to add show_expired="yes" to the tag. If not, enable the template debugger and copy/paste the output that mentions Low Events or low_events here.
zizther 11 Feb 2015 11:48
The Overwrite entry date and Overwrite expiration dateare set to No
Here is the output from the debugger and DB.
I have tried with the show_expired parameter as well
SELECT 'entry_id', 'start_date', 'end_date', 'all_day', 'start_time', 'end_time'
FROM ('exp_low_events')
WHERE 'site_id' IN ('1')
AND ((start_date < 2015-02-11) OR (start_date = 2015-02-11 AND IFNULL(start_time, '00:00:00') < '11:43'))
AND ((UNIX_TIMESTAMP(CONCAT(start_date, ' ', IFNULL(start_time, '00:00:00'))) > UNIX_TIMESTAMP()) OR (UNIX_TIMESTAMP(CONCAT(end_date, ' ', IFNULL(end_time, '23:59:59'))) < UNIX_TIMESTAMP()))
ORDER BY 'start_date', 'start_time', 'end_date', 'end_time'
#APP/third_party/low_events/models/low_events_event_model.php L:324 Low_events_event_model::get_range()
Tag: {exp:low_events:entries channel="events" disable="categories|category_fields|member_data" limit="12" pagination="both" show_active="no" show_expired="yes" show_passed="yes" show_upcoming="no" search:event_show_past="Yes" sort="desc" unit="passed" }
Module Tag: Low_events/entries
Calling Class/Method: Low_events/entries
-> Class Called: Low_events
Low Events: Fetching channel fields from API
-> Method Called: entries
Low Events: Working date set to 2015-02-11 11:45
Low Events: Unit: passed
Low Events: No event ids found, returning no results
Returning No Results Content
-> Data Returned
- End Tag Processing -
Low 11 Feb 2015 12:11
If you drop me an email at hi at gotolow dot com, I'll send you a patched file.