I have a View which should display a list of events from the Events Calendar. This was working in the past, but now no events are being returned.
Link to a page where the issue can be seen: hidden link
(the view displays in the box in the centre of the screen headed 'Activities & Events'). To access this staging site, please use username = 'flywheel', password = 'jittery-odyssey'.
The page is giving a MySQL error: Unknown column 'EventStartDate' in 'order clause' for this query:
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_postmeta as tribe_event_end_date
ON ( wp_posts.ID = tribe_event_end_date.post_id
AND tribe_event_end_date.meta_key = '_EventEndDate' )
WHERE 1=1
AND wp_posts.ID NOT IN (6216)
AND ( wp_term_relationships.term_taxonomy_id IN (1046) )
AND wp_posts.post_type = 'tribe_events'
AND ((wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'private'))
GROUP BY wp_posts.ID
ORDER BY EventStartDate ASC, wp_posts.post_date ASC
LIMIT 0, 3
The query returns the correct posts if I add in an underscore:
... ORDER BY _EventStartDate ASC ...
I've experimented with using older versions of Views, and it seems that the issue first occurs with v2.6.4 - versions older than that return the list of events as expected. The changelog for that version includes:
Fixed a compatibility issue where a View listing "Events" from the "The Events Calendar" plugin was returning no results.
So I wonder if the compatibility fix has introduced a new problem in my case?
I can provide access to the site if required for investigating this.
Hi, can you edit this View in wp-admin, expand all the filters in the Query Filter panel, and take a screenshot? Attach that image to your next reply. I would like to see how it's set up to try to reproduce this issue.
'Park tags' is a custom taxonomy which is applied to the 'Parks' CPT and the events - so the View is supposed to display events whose park tag matches the park tag on the Park post which is being displayed.
Okay thank you, I will need to do some deeper investigation. I'd like to log in to your wp-admin area and make a clone of the site using the Duplicator plugin. If that's okay with you, please provide login credentials in the private reply fields here.
There are actually several plugins:
* The Events Calendar
* Events Calendar Pro
* The Events Calendar: Community Events
* The Events Calendar: Filter Bar
I think you'd better have them all.
What's the best way to send you the plugins (the Upload an image button won't allow .zip files, I think.)? I can put them in Dropbox and share a link maybe?
I've tried disabling the other plugins, and yes it does work fine.
I reenabled the plugins one by one, and the conflict seems to be with a plugin called "Gravity Forms Submit to Access" (v1.3) by Gravity Wiz. It's an add-on for Gravity forms. Plugin page is here: hidden link (that page helpfully includes the plugin code).
The list of events also shows if I disable Gravity Forms itself - presumably the plugin doesn't do anything if Gravity Forms isn't active.
I would like to assume so as well since its a gravity forms related plugin.
It seems what is happening is that it is interfering with the query that our toolset plugin generates. If there is no need for the plugin I would recommend disabling it.