My shortcode is [ESPRESSO_EVENTS category_slug=”foundation-handgun-carbine-shotgun” , month=”August 2022″] and its returning one event from this category which has the date August 19,2022 and another event from the same category which has the date July 29,2022.Kindly help me solve this.
https://alaskatactical.com/schedule/ this is the page link. You have to choose Handgun,carbine & shortgun – stage 1 from the Category dropdown and from Month dropdown choose August 2022
(_gmt are the ‘raw values’ and then EE uses those with your sites offsite for all other DateTime outputs)
The query for month uses:
$SQL = " AND {$datetime_table}.DTT_EVT_start <= '";
$SQL .= date('Y-m-t 23:59:59', EEH_DTT_Helper::first_of_month_timestamp($month)) . "'";
// event end date is GREATER than the start of the month ( so nothing that ended before this month )
$SQL .= " AND {$datetime_table}.DTT_EVT_end >= '";
$SQL .= date('Y-m-01 0:0:00', EEH_DTT_Helper::first_of_month_timestamp($month)) . "' ";
For that July event the value is stored as:
DTT_EVT_end_gmt": "2022-08-01T01:00:00"
So it’s pulled into that query.
I don’t have a solution you can use to fix this as is but will create a ticket for our developers to investigate this further.
Thank you for letting me know the actual cause of this problem.
The support post ‘Shortcode used for filtering month and category returning one wrong record.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.