Forum Replies Created
-
AuthorPosts
-
Jen Russo
ParticipantJaime
If you go to Events Settings < General, what do you have set for Create recurring events created in advance for? 2 MONTHS
Is whatever you have set here not honored in the creation of recurring events? IT IS NOT CREATING THEM. THE ONLY WAY I CAN GET IT TO CREATE THE RECURRING SEQUENCE IS TO OPEN THE EVENT AND HIT UPDATE SEVERAL TIMES
BASICALLY AS DESCRIBED IN THIS OTHER SUPPORT ISSUE – https://theeventscalendar.com/support/forums/topic/recurring-events-are-not-being-generated/
Let me know if you have any other questions in the meantime!
I AM ALSO SENDING YOU SCREEN SHOTS. LET ME KNOW IF YOU NEED ANY ADDITIONAL INFO. IF YOU LOOK AT SOME OF MY OTHER SUPPORT TICKETS I HAVE ALSO BROUGHT UP RECURRING ISSUES BEFORE.THANKS !!
Jen Russo
ParticipantQuick note: I just checked and those “custom bits” are actually all already disabled.
Jen Russo
ParticipantHi Cliff (Jon Brown from 9seed impersonating Jen),
I just wanted to clarify a couple things. What were seeing is a MySQL error, not a PHP error
This is what I see in the logs:
[Tue Jul 11 08:45:56.596492 2017] [:error] [pid 18729] [client 104.197.196.165:17708] WordPress database error Unknown column 'post_parent' in 'group statement' for query \n\t\t\tSELECT\n\t\t\t\tSQL_CALC_FOUND_ROWS *\n\t\t\tFROM (\n\t\t\t\tSELECT DISTINCT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_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 ( \n wp_term_relationships.term_taxonomy_id IN (36567)\n) AND ( \n wp_postmeta.meta_key = '_EventStartDate'\n) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date ASC \n\t\t\t) a\n\t\t\tGROUP BY IF( post_parent = 0, ID, post_parent )\n\t\t\tORDER BY EventStartDate ASC\n\t\t\tLIMIT 0, 16\n\t\t /* From [mauitime.com/wp-json/tribe/events/v1/events/?categories=food-truck] in [/nas/content/live/mauitime/wp-content/plugins/the-events-calendar/src/Tribe/Query.php:1020] */ made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func, Tribe__Events__REST__V1__Endpoints__Archive_Event->get, Tribe__Events__REST__V1__Endpoints__Archive_Event->has_previous, tribe_get_events, Tribe__Events__Query::getEvents, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, referer: https://mauitime.com/maui-events/category/food-truck/The call comes from /wp-content/plugins/the-events-calendar/src/Tribe/Query.php:1020, and hits on every
Tribe__Events__REST__V1__Endpoints__Archive_Event->has_next
and
Tribe__Events__REST__V1__Endpoints__Archive_Event->has_previousThe query being generated by TEC here cleaned up is:
SELECT SQL_CALC_FOUND_ROWS * FROM ( SELECT DISTINCT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_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_term_relationships.term_taxonomy_id IN (36567) ) AND ( wp_postmeta.meta_key = '_EventStartDate' ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish')) ORDER BY wp_posts.post_date ASC ) a GROUP BY IF( post_parent = 0, ID, post_parent ) ORDER BY EventStartDate ASC LIMIT 0, 16You can see the raq query run against our DB and error here:
https://cldup.com/BK_csWD-HD-3000×3000.pngI can’t parse that in my head to figure out why post_parent doesn’t exist in the aliased table, but I can confirm every tribe_events post in the wp_posts table does indeed have an integer value (0 or post id like 31212).
Further, I tried stripping things down to remove the group and order from the query like so (not sure I did things right, MySQL is not my superpower):
SELECT SQL_CALC_FOUND_ROWS * FROM ( SELECT DISTINCT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_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_term_relationships.term_taxonomy_id IN (36567) ) AND ( wp_postmeta.meta_key = '_EventStartDate' ) AND wp_posts.post_type = 'tribe_events' AND ((wp_posts.post_status = 'publish')) # ORDER BY wp_posts.post_date ASC ) a # GROUP BY IF( post_parent = 0, ID, post_parent ) # ORDER BY EventStartDate ASC # LIMIT 0, 16and the result I got was JUST the ids in a column (no post_pareent column).
https://cldup.com/s2CI4t5J7c-2000×2000.png
There is a little custom code (mostly provided by Tribe long ago) running on this site to try to keep it functioning with the large number of recurring events it has. Hence it’s certainly _possible_ that one of those bits of code is messing up this query up stream, so if that’s _not_ what your standard query is supposed to return let us know and we’ll backtrace it (again) up through the filters to see what might be messing it up.
January 13, 2017 at 4:53 pm in reply to: Looking at ElasticSearch / ElasticPress to fix slow queries/timeouts/502s #1218477Jen Russo
ParticipantQuick note: I did figure out ElasticPress doesn’t index protected (underscore prefixed) fields… so I added this:
function mt_elasticpress_whitelist_meta_keys( $meta, $post ) { return array_unique( array_merge( $meta, array( '_EventOrigin', '_EventAuditTrail', '_EventShowMapLink', '_EventShowMap', '_EventStartDate', '_EventEndDate', '_EventDuration', '_EventCurrencySymbol', '_EventCurrencyPosition', '_EventRecurrence', '_EventStartDateUTC', '_EventEndDateUTC', '_EventTimezone', '_EventTimezoneAbbr', '_EventOrganizerID', '_EventAllDay', '_EventNextPendingRecurrence', '_EventVenueID', '_EventCost', ) ) ); } add_filter( 'ep_prepare_meta_allowed_protected_keys', 'mt_elasticpress_whitelist_meta_keys', 10, 2 );and now it’s index those… however it’s returning ALL occurences of a recurring event on a single event page (looping through them all rather than just the current event)
Jen Russo
ParticipantI tracked down some more information. When the cron runs to calculate recurring events, it can technically time out before getting all the events figured out. It doesn’t look like the code is properly picking up on htis fact and restarting in the middle. Am I seeing that correctly? I manually ran the cron many times and eventually I got through all the events and now everything is calculated as expected. I can handle a little variation day by day since I’m calculating a month out but something went wrong somewhere, possibly because I had old code, and I ran out of future events. Is there any way around this problem? Did I just have a bad version of the code?
Jen Russo
ParticipantThe problem I am having is that recurring events are not getting calculated. This happens in a cron once a day. Do you have a good way I can reliably force that to happen after the updates to test it out? I need these to be calculated now, not hopefully tonight. How do I force a recurring event calculation to happen right now.
Jen Russo
ParticipantI get that, because I updated and it went away. but the thing is, I cannot update my site to 4.0 because it breaks my export. So is there a work around for those of us that have to stay on 3.12?
thanks for any additional info
Jen
Jen Russo
ParticipantBrian
that is fine, i am testing on a staging environment to be safe anyway. This is what I found: https://theeventscalendar.com/support/forums/topic/events-calendar-plugin-disabling-my-menu-function/
I had to start a new thread for a different issue that came up. Can you help w this one?Jen Russo
ParticipantBrian my bad. I see that i was trying to update to the 4. version of community events but the system jammed up w fatal error. Let me work on the updates for all my add ons simultaneously and see what transpires. I believe I tried that first and also got a fatal error so i went to the one by one update to see what errors came up.
thanks!
Jen Russo
ParticipantBrian,
I have both TECP and community events updated to 4.0 and I am getting this message.
So are you saying I updated them incorrectly? or that i have to upload them simultaneously and not one at a time?
Right now I am updating them through the auto update in the wordpress backend.
thank you for explaining more about what I need to do to remove this fatal error from my site.
Jen
Jen Russo
ParticipantBrian,
dang it I always forget that there is a pssword on staging.
ok I realized there is another snippet in the knowledgebase – that fixes the excerpt view. see below. now I have a different thing coming up – its a phantom half photo. and the top has a big space not sure why.

to look go to the staging link i gave you login is 9 pass is seeds
knowledge base code for post excerpt fix
/*
* Filter for Full Content on The Events Calender(3.8) Views Page in Genesis(2.1.2) when using Default Page Template in Event Display Settings
* Shows Event Calendar Views Such as Month, List, etc even if Content Archive Setting in Genesis is set to Display post excerpts
* The Events Calendar @3.10
* Genesis @2.1.2
*/
add_filter( ‘genesis_pre_get_option_content_archive’, ‘tribe_genesis_event_archive_full_content’ );
function tribe_genesis_event_archive_full_content() {if ( class_exists( ‘Tribe__Events__Main’ ) && class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
return ‘full’;
}
} elseif ( class_exists( ‘Tribe__Events__Main’ ) && !class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
return ‘full’;
}
}
}Jen Russo
ParticipantBrian,
ok yes now I do have the side bar but the page is doing something weird. I have it set to show photo view, but it is doing something different here:
http://mauitime.staging.wpengine.com/events/
how do i get sidebar and photo view?
thanks!
Jen
Jen Russo
ParticipantBrian
these are the addl tecp code added to the functions php file in my child theme. I have it in my staging environment
http://mauitime.staging.wpengine.com/events/the filter bar fix codes you see at the bottom work, but no change from the genesis code
/*
* Genesis Page Layout of The Event Calendar Main Events Templates (Month, List, Photo, Etc..)
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc)
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_view_layouts’ );
function tribe_genesis_view_layouts() {if ( class_exists( ‘Tribe__Events__Main’ ) && class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) {
return ‘content-sidebar’;
}
} elseif ( class_exists( ‘Tribe__Events__Main’ ) && !class_exists( ‘Tribe__Events__Pro__Main’ ) ) {
if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) {
return ‘content-sidebar’;
}
}
}
/*
* Genesis Layout of The Event Calendar Views for all Templates
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target all Event Views (Month, List, Map etc), Single Events, Single Venues, and Single Organizers
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_all_layouts’ );
function tribe_genesis_all_layouts() {if( class_exists( ‘Tribe__Events__Main’ ) && tribe_is_event_query() ) {
return ‘content-sidebar’;
}
}
/*
* Genesis Layout of The Event Calendar Single Templates
* The Events Calendar @3.10
* Genesis @2.1.2
* Options – full-width-content, content-sidebar, sidebar-content, content-sidebar-sidebar, sidebar-sidebar-content, sidebar-content-sidebar
*/
//Target Single Events, Single Venues, and Single Organizers
add_filter( ‘genesis_site_layout’, ‘tribe_genesis_single_layouts’ );
function tribe_genesis_single_layouts() {if( is_singular( ‘tribe_events’ ) || is_singular( ‘tribe_venue’ ) || is_singular( ‘tribe_organizer’ ) ) {
return ‘content-sidebar’;
}}
add_filter( ‘tribe_events_filter_values’, ‘remove_filter_values_limit’, 20, 2);
function remove_filter_values_limit ( $filter_values, $slug ) {global $wpdb;
if($slug == ‘venues’) {
// get venue IDs associated with published posts
$venue_ids = $wpdb->get_col( $wpdb->prepare( “SELECT DISTINCT m.meta_value FROM {$wpdb->postmeta} m INNER JOIN {$wpdb->posts} p ON p.ID=m.post_id WHERE p.post_type=%s AND p.post_status=’publish’ AND m.meta_key=’_EventVenueID’ AND m.meta_value > 0”, Tribe__Events__Main::POSTTYPE ) );
$venue_ids = array_filter( $venue_ids );
if ( empty( $venue_ids ) ) {
return array();
}$venues = get_posts( array(
‘post_type’ => Tribe__Events__Main::VENUE_POST_TYPE,
‘posts_per_page’ => -1, // remove arbitrary limit
‘suppress_filters’ => false,
‘post__in’ => $venue_ids,
‘post_status’ => ‘publish’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
) );$venues_array = array();
foreach ( $venues as $venue ) {
$venues_array[] = array(
‘name’ => $venue->post_title,
‘value’ => $venue->ID,
);
}$filter_values = $venues_array;
}if($slug == ‘organizers’) {
$organizer_ids = $wpdb->get_col( $wpdb->prepare( “SELECT DISTINCT m.meta_value FROM {$wpdb->postmeta} m INNER JOIN {$wpdb->posts} p ON p.ID=m.post_id WHERE p.post_type=%s AND p.post_status=’publish’ AND m.meta_key=’_EventOrganizerID’ AND m.meta_value > 0”, Tribe__Events__Main::POSTTYPE ) );
array_filter( $organizer_ids );
if ( empty( $organizer_ids ) ) {
return array();
}
$organizers = get_posts( array(
‘post_type’ => Tribe__Events__Main::ORGANIZER_POST_TYPE,
‘posts_per_page’ => -1, // remove arbitrary limit
‘suppress_filters’ => false,
‘post__in’ => $organizer_ids,
‘post_status’ => ‘publish’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
) );$organizers_array = array();
foreach ( $organizers as $organizer ) {
$organizers_array[] = array(
‘name’ => $organizer->post_title,
‘value’ => $organizer->ID,
);
}
$filter_values = $organizers_array;
}return $filter_values;
}-
This reply was modified 10 years, 5 months ago by
Jen Russo.
Jen Russo
ParticipantBrian
I added the code but there is no change. I want the site sidebar to show up in events, similar to the setup with all other aspects of the site.
So we put in the ‘content-sidebar’ in the genesis code given in the knowledge base, and no change.
Is there something else I should be looking at?
thanks,
Jen
Jen Russo
ParticipantHi Brian,
yes I am trying to targe all the event views, as well as single event views, so that it uses our genesis content-sidebar style throughout.
I will put it in the child theme function.php file. let me know if you have any other suggestions.
Jen
-
This reply was modified 10 years, 5 months ago by
-
AuthorPosts
