Events Manager SQL syntax error with location
-
Hello,
I have gotten an SQL error when someone designated as an editor tries to post events. The events show up and post on the site but this error comes up:WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 for query UPDATE wp_em_locations SET location_status=NULL, location_slug=” WHERE location_id= made by edit_post, wp_update_post, wp_insert_post, do_action(‘save_post’), call_user_func_array, EM_Event_Post_Admin::save_post, EM_Event->save_meta, EM_Location->set_status
It does not produce this when an administrator posts events.
I am a novice at wp but did a search and found a similar error with Events Manager in event-save where someone posted this as a patch (which, as a newbie, I am assuming that means you can put it into your child theme to fix it??):
583c583,587
< $event_truly_exists = $wpdb->get_var(‘SELECT event_id FROM ‘.EM_EVENTS_TABLE.” WHERE event_id={$this->event_id}”) == $this->event_id;
—
> if (empty($this->event_id)) {
> $event_truly_exists = false;
> } else {
> $event_truly_exists = $wpdb->get_var(‘SELECT event_id FROM ‘.EM_EVENTS_TABLE.” WHERE event_id={$this->event_id}”) == $this->event_id;
> }Can anyone help me fix this issue and perhaps offer easy to follow instructions as I am still on the early end of learning curve? Thanks so much!
PS. My site is https://www.allied-underground.com and I am using wp 3.5.1. I have also tried turning off plugins and switching to 2013 theme but it still happens, but again only for the user who is an editor. Thank you.
- The topic ‘Events Manager SQL syntax error with location’ is closed to new replies.