When filtering events in Event Espresso – Events page by month/year, the events from 2019 no longer show in the results. it seems this behavior started when events starting in 2020 were added to the system.
What could be causing this behavior?
Thanks,
Bill
Hi Tony,
I disabled all plug-ins except EE during testing and get the same results.
Can you suggest a way I can capture logs for the page execution so get a deeper look?
Thanks
Run the filter then open debug bar in the admin bar, go to Queries.
You’re looking for the query like this:
SELECT Event_CPT.ID AS 'Event_CPT.ID', Event_CPT.post_title AS 'Event_CPT.post_title', Event_CPT.post_content AS 'Event_CPT.post_content', Event_CPT.post_name AS 'Event_CPT.post_name', Event_CPT.post_date AS 'Event_CPT.post_date', Event_CPT.post_excerpt AS 'Event_CPT.post_excerpt', Event_CPT.post_modified AS 'Event_CPT.post_modified', Event_CPT.post_author AS 'Event_CPT.post_author', Event_CPT.post_parent AS 'Event_CPT.post_parent', Event_CPT.menu_order AS 'Event_CPT.menu_order', Event_CPT.post_status AS 'Event_CPT.post_status', Event_CPT.post_password AS 'Event_CPT.post_password', Event_CPT.comment_status AS 'Event_CPT.comment_status', Event_CPT.ping_status AS 'Event_CPT.ping_status', Event_Meta.EVT_display_desc AS 'Event_Meta.EVT_display_desc', Event_Meta.EVT_display_ticket_selector AS 'Event_Meta.EVT_display_ticket_selector', Event_Meta.EVT_visible_on AS 'Event_Meta.EVT_visible_on', Event_Meta.EVT_additional_limit AS 'Event_Meta.EVT_additional_limit', Event_Meta.EVT_default_registration_status AS 'Event_Meta.EVT_default_registration_status', Event_Meta.EVT_member_only AS 'Event_Meta.EVT_member_only', Event_Meta.EVT_phone AS 'Event_Meta.EVT_phone', Event_Meta.EVT_allow_overflow AS 'Event_Meta.EVT_allow_overflow', Event_Meta.EVT_timezone_string AS 'Event_Meta.EVT_timezone_string', Event_Meta.EVT_external_URL AS 'Event_Meta.EVT_external_URL', Event_Meta.EVT_donations AS 'Event_Meta.EVT_donations', Event_CPT.ID AS 'Event_CPT.ID', Event_Meta.EVTM_ID AS 'Event_Meta.EVTM_ID', Datetime.DTT_ID AS 'Datetime.DTT_ID', Datetime.EVT_ID AS 'Datetime.EVT_ID', Datetime.DTT_name AS 'Datetime.DTT_name', Datetime.DTT_description AS 'Datetime.DTT_description', Datetime.DTT_EVT_start AS 'Datetime.DTT_EVT_start', Datetime.DTT_EVT_end AS 'Datetime.DTT_EVT_end', Datetime.DTT_reg_limit AS 'Datetime.DTT_reg_limit', Datetime.DTT_sold AS 'Datetime.DTT_sold', Datetime.DTT_reserved AS 'Datetime.DTT_reserved', Datetime.DTT_is_primary AS 'Datetime.DTT_is_primary', Datetime.DTT_order AS 'Datetime.DTT_order', Datetime.DTT_parent AS 'Datetime.DTT_parent', Datetime.DTT_deleted AS 'Datetime.DTT_deleted' FROM wp_posts AS Event_CPT LEFT JOIN wp_esp_event_meta AS Event_Meta ON Event_CPT.ID = Event_Meta.EVT_ID LEFT JOIN wp_esp_datetime AS Datetime ON Datetime.EVT_ID=Event_CPT.ID WHERE Event_CPT.post_type = 'espresso_events' AND Event_CPT.post_status NOT IN ('auto-draft','trash') AND ( (Datetime.DTT_deleted = 0) OR Datetime.DTT_ID IS NULL) AND Datetime.DTT_EVT_start BETWEEN '2020-05-01 05:00:00' AND '2020-06-01 04:59:00' AND (Event_CPT.post_title LIKE '%%' OR Event_CPT.post_content LIKE '%%' OR Event_CPT.post_excerpt LIKE '%%') GROUP BY Event_CPT.ID ORDER BY Event_CPT.ID DESC LIMIT 0,10
Obviously your dates for the BETWEEN should match whatever you selected in the dropdown and clicked to filter.
Hi Tony,
So, in the admin events screen, the event Month/Year filter shows December 2019.
The query being generated is for range December 2020. So this explains why the events don’t show. How can we get a fix?
snippet:
WHERE Event_CPT.post_type = ‘espresso_events’ AND Event_CPT.post_status NOT IN (‘auto-draft’,’trash’) AND ( (Datetime.DTT_deleted = 0) OR Datetime.DTT_ID IS NULL) AND Datetime.DTT_EVT_start BETWEEN ‘2020-12-01 07:00:00’ AND ‘2021-01-01 06:59:00’ AND (Event_CPT.post_title LIKE ‘%%’ OR Event_CPT.post_content LIKE ‘%%’ OR Event_CPT.post_excerpt LIKE ‘%%’) GROUP BY Event_CPT.ID ORDER BY Event_CPT.ID DESC LIMIT 0,20
As mentioned, we have a ticket to investigate/fix this within core (no ETA just yet) but the above can be used in the meantime.
Viewing 13 reply threads
The support post ‘Event Espresso – Events filter not working as expected’ 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.