Home › Forums › Calendar Products › Events Calendar PRO › Events Calendar Breaks Tag Archive
- This topic has 12 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
October 26, 2015 at 4:34 pm #1018716
Jon Chabun
ParticipantOn our site, Events calendar seems to break the tag archive page. We’ve tried reverting to the default wordpress theme, and uninstalling all other plugins.
I saw a few threads regarding similar issues on previous versions, but the fix (https://gist.github.com/jazbek/7442734) did not seem to work for us.
Any advice?
October 26, 2015 at 5:32 pm #1018735Geoff
MemberHey Matt, and sorry for the issue here!
I think that snippet is a little dated because it’s missing some name-spacing that we’ve introduced in newer versions. Try this snippet instead and let me know if that makes a difference instead.
Thanks!
GeoffOctober 26, 2015 at 5:37 pm #1018736Jon Chabun
ParticipantI’m assuming this won’t break anything when the plugin is updated?
October 27, 2015 at 7:21 am #1018852Geoff
MemberIt’s possible the function itself may not work after an update, but it won’t break the calendar itself.
Thanks,
GeoffOctober 29, 2015 at 10:16 am #1019904Jon Chabun
ParticipantI don’t see the snippet you referred to…
October 29, 2015 at 10:18 am #1019907Geoff
MemberAck, sorry about that! Looks like our site is having a little bit of an issue with embedding Gists at the moment.
Let’s try that again:
October 29, 2015 at 10:19 am #1019912Jon Chabun
ParticipantThanks – I’ll give that a try…
October 29, 2015 at 10:21 am #1019913Geoff
MemberRight on, thanks!
Do note that the opening PHP tag is probably not needed in your file. 🙂
October 29, 2015 at 10:29 am #1019923Jon Chabun
ParticipantHi Geoff,
I think that’s probably close, but I get the following error message on that page with that snippet in our functions file:
Fatal error: Class ‘Tribe_Events’ not found in /Users/mikelathrop/Dropbox/1work/www/mfrc/wp-content/themes/bms-barebones/inc/custom.inc.php on line 55
In my editor, I see when I highlight Tribe__Events on line 5 of the gist, it wants to autocomplete with a number of other classes that start with Tribe__Events (Tribe__Events__Abstract_Deactivation, Tribe__Events__Activation_Page, etc, etc). Is it just a matter of finding the right class with the POSTTYPE array in it that we’re after?
October 29, 2015 at 12:35 pm #1019993Geoff
MemberHmm, i’m not getting the same fatal error when using the snippet. Let’s try this again with exactly what needs to be pasted in:
https://gist.github.com/geoffgraham/3f3e25f88856cb6c51cf
Please give that a shot and let me know if it makes a difference.
Thanks and sorry for the back-and-forth here!
Geoff
October 30, 2015 at 11:25 am #1020353Jon Chabun
ParticipantThat didn’t work either, but it looks like this did:
<?php add_action( 'parse_query', 'tribe_fix_tag_query' ); function tribe_fix_tag_query( $query ) { if ( $query->is_tag && (array) $query->get( 'post_type' ) != array( Tribe__Events__MAIN::POSTTYPE ) ) { if ( empty( $query->query_vars['post_type'] ) ) { $query->query_vars['post_type'] = array( 'post' ); } if ( ! ( $query->query_vars['post_type'] == array( 'post' ) || $query->query_vars == 'post' ) ) { remove_action( 'parse_query', array( 'Tribe__Events__Query', 'parse_query' ), 50 ); remove_action( 'pre_get_posts', array( 'Tribe__Events__Query', 'pre_get_posts' ), 50 ); } } } ?>Do you see any problem with referencing Tribe__Events__MAIN::POSTTYPE instead of Tribe__Events::POSTTYPE? Is there anything in particular we should test to see if that would break something?
Cheers,
Mike
-
This reply was modified 10 years, 5 months ago by
Jon Chabun.
October 30, 2015 at 11:39 am #1020360Geoff
MemberThat should be fine to use. Give that a shot for sure!
February 18, 2016 at 8:29 am #1075270Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
This reply was modified 10 years, 5 months ago by
-
AuthorPosts
- The topic ‘Events Calendar Breaks Tag Archive’ is closed to new replies.
