Home › Forums › Calendar Products › Events Calendar PRO › The SQL generated is invalid
- This topic has 2 replies, 2 voices, and was last updated 12 years, 2 months ago by
Brook.
-
AuthorPosts
-
February 24, 2014 at 2:40 pm #108738
spikecreative
ParticipantI have the Normal version and the PRO version of The Events Calendar.
This issue I am having is The SQL generated is invalid. print_r($wp_query) inside the month/content.php file produces the following output
WP_Query Object
(
[query] => Array
(
[post_type] => tribe_events
[eventDisplay] => default
)[query_vars] => Array
(
[post_type] => tribe_events
[eventDisplay] => month
[error] =>
[m] =>
[p] => 0
[post_parent] =>
[subpost] =>
[subpost_id] =>
[attachment] =>
[attachment_id] => 0
[name] =>
[static] =>
[pagename] =>
[page_id] => 0
[second] =>
[minute] =>
[hour] =>
[day] => 0
[monthnum] => 0
[year] => 0
[w] => 0
[category_name] =>
[tag] =>
[cat] =>
[tag_id] =>
[author] =>
[author_name] =>
[feed] =>
[tb] =>
[paged] => 0
[comments_popup] =>
[meta_key] =>
[meta_value] =>
[preview] =>
[s] =>
[sentence] =>
[fields] =>
[menu_order] =>
[category__in] => Array
(
)[category__not_in] => Array
(
)[category__and] => Array
(
)[post__in] => Array
(
)[post__not_in] => Array
(
)[tag__in] => Array
(
)[tag__not_in] => Array
(
)[tag__and] => Array
(
)[tag_slug__in] => Array
(
)[tag_slug__and] => Array
(
)[post_parent__in] => Array
(
)[post_parent__not_in] => Array
(
)[author__in] => Array
(
)[author__not_in] => Array
(
)[ignore_sticky_posts] =>
[suppress_filters] =>
[cache_results] => 1
[update_post_term_cache] => 1
[update_post_meta_cache] => 1
[posts_per_page] => 10
[nopaging] =>
[comments_per_page] => 50
[no_found_rows] =>
[order] => DESC
)[tax_query] => WP_Tax_Query Object
(
[queries] => Array
(
)[relation] => AND
)[meta_query] => WP_Meta_Query Object
(
[queries] => Array
(
)[relation] =>
)[date_query] =>
[post_count] => 0
[current_post] => -1
[in_the_loop] =>
[comment_count] => 0
[current_comment] => -1
[found_posts] => 0
[max_num_pages] => 0
[max_num_comment_pages] => 0
[is_single] =>
[is_preview] =>
[is_page] =>
[is_archive] =>
[is_date] =>
[is_year] =>
[is_month] =>
[is_day] =>
[is_time] =>
[is_author] =>
[is_category] =>
[is_tag] =>
[is_tax] =>
[is_search] =>
[is_feed] =>
[is_comment_feed] =>
[is_trackback] =>
[is_home] =>
[is_404] =>
[is_comments_popup] =>
[is_paged] =>
[is_admin] =>
[is_attachment] =>
[is_singular] =>
[is_robots] =>
[is_posts_page] =>
[is_post_type_archive] => 1
[query_vars_hash] => e63415a9d6c298e731116de4e7253f29
[query_vars_changed] => 1
[thumbnails_cached] =>
[stopwords:WP_Query:private] =>
[tribe_is_event] => 1
[tribe_is_multi_posttype] =>
[tribe_is_event_category] =>
[tribe_is_event_venue] =>
[tribe_is_event_organizer] =>
[tribe_is_event_query] => 1
[tribe_is_past] =>
[queried_object] => stdClass Object
(
[labels] => stdClass Object
(
[name] => Events
[singular_name] => Event
[add_new] => Add New
[add_new_item] => Add New Event
[edit_item] => Edit Event
[new_item] => New Event
[view_item] => View Event
[search_items] => Search Events
[not_found] => No events found
[not_found_in_trash] => No events found in Trash
[parent_item_colon] =>
[all_items] => Events
[menu_name] => Events
[name_admin_bar] => Event
)[description] =>
[public] => 1
[hierarchical] =>
[exclude_from_search] =>
[publicly_queryable] => 1
[show_ui] => 1
[show_in_menu] => 1
[show_in_nav_menus] => 1
[show_in_admin_bar] => 1
[menu_position] => 6
[menu_icon] => dashicons-calendar
[capability_type] => tribe_event
[map_meta_cap] => 1
[register_meta_box_cb] =>
[taxonomies] => Array
(
[0] => post_tag
)[has_archive] =>
[rewrite] => Array
(
[slug] => event
[with_front] =>
[pages] => 1
[feeds] =>
[ep_mask] => 1
)[query_var] => tribe_events
[can_export] => 1
[delete_with_user] =>
[_builtin] =>
[_edit_link] => post.php?post=%d
[name] => tribe_events
[cap] => stdClass Object
(
[edit_post] => edit_tribe_event
[read_post] => read_tribe_event
[delete_post] => delete_tribe_event
[edit_posts] => edit_tribe_events
[edit_others_posts] => edit_others_tribe_events
[publish_posts] => publish_tribe_events
[read_private_posts] => read_private_tribe_events
[read] => read
[delete_posts] => delete_tribe_events
[delete_private_posts] => delete_private_tribe_events
[delete_published_posts] => delete_published_tribe_events
[delete_others_posts] => delete_others_tribe_events
[edit_private_posts] => edit_private_tribe_events
[edit_published_posts] => edit_published_tribe_events
[create_posts] => edit_tribe_events
)[label] => Events
)[queried_object_id] => 0
[tribe_is_week] =>
[tribe_is_day] =>
[tribe_is_photo] =>
[tribe_is_map] =>
[tribe_is_event_pro_query] => 1
[request] => SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID FROM wp_posts 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’ ) LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = ‘_EventDuration’ ) WHERE 1=1 AND wp_posts.post_type = ‘tribe_events’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) ORDER BY DATE(wp_postmeta.meta_value) DESC, TIME(wp_postmeta.meta_value) DESC LIMIT 0, 10
[posts] => Array
(
))
The SQL generated is invalid
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID FROM wp_posts 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’ ) LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = ‘_EventDuration’ ) WHERE 1=1 AND wp_posts.post_type = ‘tribe_events’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) ORDER BY DATE(wp_postmeta.meta_value) DESC, TIME(wp_postmeta.meta_value) DESC LIMIT 0, 10
“Unknown column ‘wp_postmeta.meta_value’ in ‘order clause’”
Can you please advise me on how to resolve this…
February 25, 2014 at 12:30 am #109025spikecreative
ParticipantAlso if your deactivate the PRO version of the Plugin everything works again.
If someone could please get back to me that would be excellent. I currently on a deadline for this Job and REALLY need a resolution.
February 25, 2014 at 9:47 am #109165Brook
ParticipantHowdy spikecreative,
I would love to help and do my best to help you meet your deadline. I am looking around and I have not found anyone with a similar issue, not am I able to reproduce the problem. This means that there is something very likely to be quite unique about your install. The most unique thing about the average WP install is the combination of plugins/theme that are being run. To that end, let us run through some diagnostic steps to see if there is a plugin or perhaps your theme that is conflicting with the Pro plugin and causing this behavior.
First, would you mind grabbing your system information and pasting it here? Make sure to use the ‘Set as private reply’ checkbox to protect your private information from the public. You can find the system info by going to WP Admin > Events > Settings, clicking on the “Help” tab, and scrolling down to the ‘System Information’ box. (Or by going to [yoursite]/wp-admin/edit.php?post_type=tribe_events&page=tribe-events-calendar&tab=help) That will give me a lot of extra information to help diagnose the problem.
Next, could you try temporarily activating the default 2013 theme, and seeing if the issue persists.
If disabling the theme fixes it, we have narrowed the issue down to a theme conflict. Do you have any theme overrides for the Events Calendar? If so could you try disabling them by renaming your [themename]/tribe-events/ folder to ‘tribe-events-bak’. Did that fix it?
If the issue persists in the default 2013 theme, then we have a different set of debugging steps. Please keep the 2013 theme enabled, and also disable any plugins other than the ones from Modern Tribe to see if that fixes it. If it does, please try reenabling the plugins one at a time until the issue resurfaces. When it does resurface, can you let me know which plugin caused that to happen?
Does that all make sense? Are you able to run through those steps and help isolate the issue? Please let me know. Cheers!
– Brook
-
AuthorPosts
- The topic ‘The SQL generated is invalid’ is closed to new replies.
