Skip Navigation

[Resolved] View does not show events from Tribe Events Calendar plugin

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a View that is supposed to show event posts from Modern Tribe Events Calendar, but it is not working. There is an error displayed:

Unknown column 'EventStartDate' in 'order clause'

If I add an underscore like '_EventStartDate', the query works.

Solution: It seems to be a conflict with the Submit Gravity Form Access Content plugin.

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 14 replies, has 3 voices.

Last updated by Chris 6 years ago.

Assisted by: Shane.

Author
Posts
#1149227

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.

Thanks,

Chris

#1149425

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.

#1149803
Screen Shot 2018-11-20 at 09.37.38.png

Hi Christian,

OK, here's what it looks like.

'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.

Thanks,

Chris

#1150003

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.

#1150814

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

Could you update events calendar to the latest version and let me know if the issue still remains ?

Thanks,
Shane

#1151232

Hi Shane,

OK, I've upgraded to The Events Calendar version 4.6.26.1, but it's still not showing the events.

Thanks,

Chris

#1151326

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

I had some issues with getting a copy of your site using the duplicator plugin.

Would you mind providing me with a copy of the events calendar plugin so that I can try to run a test here locally to see if I can replicate?

Thanks,
Shane

#1151379

Hi Shane,

OK will do.

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?

- Chris

#1151393

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

Yes this will work.

You can upload to dropbox and share it with me.

Thanks,
SHane

#1151443

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

I did a test and it works fine locally with the events calendar plugin.

Could you temporarily disable all the non-toolset plugins with the exception of events calendar and let me know if the issue still remains?

Thanks,
Shane

#1152154

Hi Shane,

Ok thanks for testing that.

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.

Thanks,

Chris

#1152159

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

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.

Thanks,
Shane

#1152171

OK, thanks Shane. I will take a look on Monday and see whether this plugin is actually required.

- Chris

#1152183

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Chris,

If it is a required plugin then I would recommend opening a ticket with the gravity forms team for them to take a look at this.

Hopefully they would be able to provide a patch for you.

Thanks,
Shane

#1153128

OK, thanks Shane. I think we can find another solution that doesn't use that plugin - that's probably the simplest way forward.

Many thanks for your help with getting to the bottom of this!

- Chris