Home › Forums › Calendar Products › Events Calendar PRO › Error in SQL syntax when finding min/max coordinates for an empty event set
- This topic has 4 replies, 3 voices, and was last updated 8 years, 2 months ago by
Danial Bleile.
-
AuthorPosts
-
November 9, 2017 at 4:26 pm #1379545
Danial Bleile
ParticipantThe 4.4.19 update appears to have refactored the handling of coordinate calculations for events and now includes a Tribe__Events__Pro__Geo_Loc::get_min_max_coords() method.
Previously, the code in this area would only run a SQL query when it could populate a list of events to include. After the change, the SQL query runs even when the list of events is empty. This results in a query like:
SELECT MAX( coords.lat ) [....snip....] WHERE meta_key = '_EventVenueID' AND post_id IN () ) ) AS coordsBecause no data is passed to the IN portion of that query, it generates an error.
It looks like the code should check for an empty $event_ids_prepared before running that query. This is what we’ll do in the meantime as a hotfix at WSU.
This is related to https://theeventscalendar.com/support/forums/topic/uncaught-typeerror-cannot-read-property-max_lat-of-null/ in that the same JavaScript error appears on the front end –
Cannot read property 'max_lat' of null.(I would include more details with code, but this forum doesn’t seem to handle multi-line code formatting very well)
November 13, 2017 at 5:06 am #1381395Andras
KeymasterHello Jeremy,
It looks like this is a glitch in the plugin. I have submitted a bugticket on this so our developers can take a look at it.
Until the fix is released the workaround is to roll back to Events Calendar PRO 4.4.18.
I am going to set the status of this ticket to “pending fix” and we will update it once the fix is released. If you have any new questions or issues please create a new ticket and reference this one.
Thanks for your patience!
Cheers,
AndrasJanuary 26, 2018 at 7:39 am #1436994Nico
MemberHi there,
Just wanted to share with you that a new maintenance release (for the Week of 7th January 2018) is out, including a fix for this issue :slightly_smiling_face:
Find out more about this release → https://theeventscalendar.com/maintenance-release-week-7-january-2018/
Please update the plugins and let us know if the fix works for your site,
Best,
NicoFebruary 17, 2018 at 8:35 am #1456308Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Error in SQL syntax when finding min/max coordinates for an empty event set’ is closed to new replies.
