Searches omit events with no location
-
When I search, events with no location aren’t listed. For example, see http://stlwildones.org/calendar/. Note the board meeting on Jan. 7. Search by title, date, or category, and that event is not listed.
I used a plug-in to check the SQL code, and found this (asterisks mine):
SELECT wp_em_events.post_id FROM wp_em_events LEFT JOIN wp_em_locations ON wp_em_locations.location_id=wp_em_events.location_id WHERE (<code>recurrence</code>!=1 OR <code>recurrence</code> IS NULL) AND ( event_start_date >= CAST('2014-12-05' AS DATE) OR (event_end_date >= CAST('2014-12-05' AS DATE) AND event_end_date != '0000-00-00' AND event_end_date IS NOT NULL)) /************************************/ /************************************/ AND location_country='US' /************************************/ /************************************/ AND (wp_em_events.post_id IN...
So, even though it’s left joining to the Locations table, it’s requiring that the Country is US. If I remove that line and run the query directly in my database, it returns the correct records.
Now, the question is how to prevent Events Manager from including that criteria. Here are my location settings:
– Default location: none
– Default country: US
– Enable locations: yes
– Require locations: no
– Use dropdown for locations: no
– Enable location attributes: no
– Enable location custom fields: noI tried removing the default country (US), but it didn’t help.
Any suggestions? I assume this is not the intended functionality. As a work-around, where can I edit the generated SQL code?
- The topic ‘Searches omit events with no location’ is closed to new replies.