{"id":108738,"date":"2014-02-24T14:40:29","date_gmt":"2014-02-24T22:40:29","guid":{"rendered":"https:\/\/tri.be\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/"},"modified":"2014-06-07T14:18:09","modified_gmt":"2014-06-07T21:18:09","slug":"conflict-with-wp-member-version-4-0-43-by-smartmediapro-com","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/","title":{"rendered":"The SQL generated is invalid"},"content":{"rendered":"<p>I have the Normal version and the PRO version of The Events Calendar.<\/p>\n<p>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<\/p>\n<p>WP_Query Object<br \/>\n(<br \/>\n    [query] =&gt; Array<br \/>\n        (<br \/>\n            [post_type] =&gt; tribe_events<br \/>\n            [eventDisplay] =&gt; default<br \/>\n        )<\/p>\n<p>    [query_vars] =&gt; Array<br \/>\n        (<br \/>\n            [post_type] =&gt; tribe_events<br \/>\n            [eventDisplay] =&gt; month<br \/>\n            [error] =&gt;<br \/>\n            [m] =&gt;<br \/>\n            [p] =&gt; 0<br \/>\n            [post_parent] =&gt;<br \/>\n            [subpost] =&gt;<br \/>\n            [subpost_id] =&gt;<br \/>\n            [attachment] =&gt;<br \/>\n            [attachment_id] =&gt; 0<br \/>\n            [name] =&gt;<br \/>\n            [static] =&gt;<br \/>\n            [pagename] =&gt;<br \/>\n            [page_id] =&gt; 0<br \/>\n            [second] =&gt;<br \/>\n            [minute] =&gt;<br \/>\n            [hour] =&gt;<br \/>\n            [day] =&gt; 0<br \/>\n            [monthnum] =&gt; 0<br \/>\n            [year] =&gt; 0<br \/>\n            [w] =&gt; 0<br \/>\n            [category_name] =&gt;<br \/>\n            [tag] =&gt;<br \/>\n            [cat] =&gt;<br \/>\n            [tag_id] =&gt;<br \/>\n            [author] =&gt;<br \/>\n            [author_name] =&gt;<br \/>\n            [feed] =&gt;<br \/>\n            [tb] =&gt;<br \/>\n            [paged] =&gt; 0<br \/>\n            [comments_popup] =&gt;<br \/>\n            [meta_key] =&gt;<br \/>\n            [meta_value] =&gt;<br \/>\n            [preview] =&gt;<br \/>\n            [s] =&gt;<br \/>\n            [sentence] =&gt;<br \/>\n            [fields] =&gt;<br \/>\n            [menu_order] =&gt;<br \/>\n            [category__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [category__not_in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [category__and] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [post__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [post__not_in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [tag__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [tag__not_in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [tag__and] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [tag_slug__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [tag_slug__and] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [post_parent__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [post_parent__not_in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [author__in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [author__not_in] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [ignore_sticky_posts] =&gt;<br \/>\n            [suppress_filters] =&gt;<br \/>\n            [cache_results] =&gt; 1<br \/>\n            [update_post_term_cache] =&gt; 1<br \/>\n            [update_post_meta_cache] =&gt; 1<br \/>\n            [posts_per_page] =&gt; 10<br \/>\n            [nopaging] =&gt;<br \/>\n            [comments_per_page] =&gt; 50<br \/>\n            [no_found_rows] =&gt;<br \/>\n            [order] =&gt; DESC<br \/>\n        )<\/p>\n<p>    [tax_query] =&gt; WP_Tax_Query Object<br \/>\n        (<br \/>\n            [queries] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [relation] =&gt; AND<br \/>\n        )<\/p>\n<p>    [meta_query] =&gt; WP_Meta_Query Object<br \/>\n        (<br \/>\n            [queries] =&gt; Array<br \/>\n                (<br \/>\n                )<\/p>\n<p>            [relation] =&gt;<br \/>\n        )<\/p>\n<p>    [date_query] =&gt;<br \/>\n    [post_count] =&gt; 0<br \/>\n    [current_post] =&gt; -1<br \/>\n    [in_the_loop] =&gt;<br \/>\n    [comment_count] =&gt; 0<br \/>\n    [current_comment] =&gt; -1<br \/>\n    [found_posts] =&gt; 0<br \/>\n    [max_num_pages] =&gt; 0<br \/>\n    [max_num_comment_pages] =&gt; 0<br \/>\n    [is_single] =&gt;<br \/>\n    [is_preview] =&gt;<br \/>\n    [is_page] =&gt;<br \/>\n    [is_archive] =&gt;<br \/>\n    [is_date] =&gt;<br \/>\n    [is_year] =&gt;<br \/>\n    [is_month] =&gt;<br \/>\n    [is_day] =&gt;<br \/>\n    [is_time] =&gt;<br \/>\n    [is_author] =&gt;<br \/>\n    [is_category] =&gt;<br \/>\n    [is_tag] =&gt;<br \/>\n    [is_tax] =&gt;<br \/>\n    [is_search] =&gt;<br \/>\n    [is_feed] =&gt;<br \/>\n    [is_comment_feed] =&gt;<br \/>\n    [is_trackback] =&gt;<br \/>\n    [is_home] =&gt;<br \/>\n    [is_404] =&gt;<br \/>\n    [is_comments_popup] =&gt;<br \/>\n    [is_paged] =&gt;<br \/>\n    [is_admin] =&gt;<br \/>\n    [is_attachment] =&gt;<br \/>\n    [is_singular] =&gt;<br \/>\n    [is_robots] =&gt;<br \/>\n    [is_posts_page] =&gt;<br \/>\n    [is_post_type_archive] =&gt; 1<br \/>\n    [query_vars_hash] =&gt; e63415a9d6c298e731116de4e7253f29<br \/>\n    [query_vars_changed] =&gt; 1<br \/>\n    [thumbnails_cached] =&gt;<br \/>\n    [stopwords:WP_Query:private] =&gt;<br \/>\n    [tribe_is_event] =&gt; 1<br \/>\n    [tribe_is_multi_posttype] =&gt;<br \/>\n    [tribe_is_event_category] =&gt;<br \/>\n    [tribe_is_event_venue] =&gt;<br \/>\n    [tribe_is_event_organizer] =&gt;<br \/>\n    [tribe_is_event_query] =&gt; 1<br \/>\n    [tribe_is_past] =&gt;<br \/>\n    [queried_object] =&gt; stdClass Object<br \/>\n        (<br \/>\n            [labels] =&gt; stdClass Object<br \/>\n                (<br \/>\n                    [name] =&gt; Events<br \/>\n                    [singular_name] =&gt; Event<br \/>\n                    [add_new] =&gt; Add New<br \/>\n                    [add_new_item] =&gt; Add New Event<br \/>\n                    [edit_item] =&gt; Edit Event<br \/>\n                    [new_item] =&gt; New Event<br \/>\n                    [view_item] =&gt; View Event<br \/>\n                    [search_items] =&gt; Search Events<br \/>\n                    [not_found] =&gt; No events found<br \/>\n                    [not_found_in_trash] =&gt; No events found in Trash<br \/>\n                    [parent_item_colon] =&gt;<br \/>\n                    [all_items] =&gt; Events<br \/>\n                    [menu_name] =&gt; Events<br \/>\n                    [name_admin_bar] =&gt; Event<br \/>\n                )<\/p>\n<p>            [description] =&gt;<br \/>\n            [public] =&gt; 1<br \/>\n            [hierarchical] =&gt;<br \/>\n            [exclude_from_search] =&gt;<br \/>\n            [publicly_queryable] =&gt; 1<br \/>\n            [show_ui] =&gt; 1<br \/>\n            [show_in_menu] =&gt; 1<br \/>\n            [show_in_nav_menus] =&gt; 1<br \/>\n            [show_in_admin_bar] =&gt; 1<br \/>\n            [menu_position] =&gt; 6<br \/>\n            [menu_icon] =&gt; dashicons-calendar<br \/>\n            [capability_type] =&gt; tribe_event<br \/>\n            [map_meta_cap] =&gt; 1<br \/>\n            [register_meta_box_cb] =&gt;<br \/>\n            [taxonomies] =&gt; Array<br \/>\n                (<br \/>\n                    [0] =&gt; post_tag<br \/>\n                )<\/p>\n<p>            [has_archive] =&gt;<br \/>\n            [rewrite] =&gt; Array<br \/>\n                (<br \/>\n                    [slug] =&gt; event<br \/>\n                    [with_front] =&gt;<br \/>\n                    [pages] =&gt; 1<br \/>\n                    [feeds] =&gt;<br \/>\n                    [ep_mask] =&gt; 1<br \/>\n                )<\/p>\n<p>            [query_var] =&gt; tribe_events<br \/>\n            [can_export] =&gt; 1<br \/>\n            [delete_with_user] =&gt;<br \/>\n            [_builtin] =&gt;<br \/>\n            [_edit_link] =&gt; post.php?post=%d<br \/>\n            [name] =&gt; tribe_events<br \/>\n            [cap] =&gt; stdClass Object<br \/>\n                (<br \/>\n                    [edit_post] =&gt; edit_tribe_event<br \/>\n                    [read_post] =&gt; read_tribe_event<br \/>\n                    [delete_post] =&gt; delete_tribe_event<br \/>\n                    [edit_posts] =&gt; edit_tribe_events<br \/>\n                    [edit_others_posts] =&gt; edit_others_tribe_events<br \/>\n                    [publish_posts] =&gt; publish_tribe_events<br \/>\n                    [read_private_posts] =&gt; read_private_tribe_events<br \/>\n                    [read] =&gt; read<br \/>\n                    [delete_posts] =&gt; delete_tribe_events<br \/>\n                    [delete_private_posts] =&gt; delete_private_tribe_events<br \/>\n                    [delete_published_posts] =&gt; delete_published_tribe_events<br \/>\n                    [delete_others_posts] =&gt; delete_others_tribe_events<br \/>\n                    [edit_private_posts] =&gt; edit_private_tribe_events<br \/>\n                    [edit_published_posts] =&gt; edit_published_tribe_events<br \/>\n                    [create_posts] =&gt; edit_tribe_events<br \/>\n                )<\/p>\n<p>            [label] =&gt; Events<br \/>\n        )<\/p>\n<p>    [queried_object_id] =&gt; 0<br \/>\n    [tribe_is_week] =&gt;<br \/>\n    [tribe_is_day] =&gt;<br \/>\n    [tribe_is_photo] =&gt;<br \/>\n    [tribe_is_map] =&gt;<br \/>\n    [tribe_is_event_pro_query] =&gt; 1<br \/>\n    [request] =&gt; 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 = &#8216;_EventEndDate&#8217; )  LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = &#8216;_EventDuration&#8217; )  WHERE 1=1  AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;private&#8217;)  ORDER BY DATE(wp_postmeta.meta_value) DESC, TIME(wp_postmeta.meta_value) DESC LIMIT 0, 10<br \/>\n    [posts] =&gt; Array<br \/>\n        (<br \/>\n        )<\/p>\n<p>)<\/p>\n<p>The SQL generated is invalid<\/p>\n<p>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 = &#8216;_EventEndDate&#8217; ) LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = &#8216;_EventDuration&#8217; ) WHERE 1=1 AND wp_posts.post_type = &#8216;tribe_events&#8217; AND (wp_posts.post_status = &#8216;publish&#8217; OR wp_posts.post_status = &#8216;private&#8217;) ORDER BY DATE(wp_postmeta.meta_value) DESC, TIME(wp_postmeta.meta_value) DESC LIMIT 0, 10<\/p>\n<p>&#8220;Unknown column &#8216;wp_postmeta.meta_value&#8217; in &#8216;order clause\u2019&#8221;<\/p>\n<p>Can you please advise me on how to resolve this&#8230;<\/p>\n","protected":false},"template":"","class_list":["post-108738","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The SQL generated is invalid -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The SQL generated is invalid -\" \/>\n<meta property=\"og:description\" content=\"I 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] =&gt; Array ( [post_type] =&gt; tribe_events [eventDisplay] =&gt; default ) [query_vars] =&gt; Array ( [post_type] =&gt; tribe_events [eventDisplay] [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/\" \/>\n<meta property=\"article:modified_time\" content=\"2014-06-07T21:18:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/\",\"name\":\"The SQL generated is invalid -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-02-24T22:40:29+00:00\",\"dateModified\":\"2014-06-07T21:18:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"The SQL generated is invalid\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The SQL generated is invalid -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/","og_locale":"en_US","og_type":"article","og_title":"The SQL generated is invalid -","og_description":"I 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] =&gt; Array ( [post_type] =&gt; tribe_events [eventDisplay] =&gt; default ) [query_vars] =&gt; Array ( [post_type] =&gt; tribe_events [eventDisplay] [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/","article_modified_time":"2014-06-07T21:18:09+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/","name":"The SQL generated is invalid -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-02-24T22:40:29+00:00","dateModified":"2014-06-07T21:18:09+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/conflict-with-wp-member-version-4-0-43-by-smartmediapro-com\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"The SQL generated is invalid"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/108738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/108738\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=108738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}