Home › Forums › Calendar Products › Events Calendar PRO › Broken slider powered by tags
- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by Barry.
-
AuthorPosts
-
June 17, 2015 at 1:22 pm #970227JoeParticipant
I’m using an old theme from Woothemes that has a slider that uses tags to choose the correct slides. An older version of The Events Calendar broke this as well. We used the content below in the functions.php file to bring it back to life. I just updated to 3.10 –tested on other sites and it worked fine, but this site doesn’t have a good backup site to test on and I went on faith. Stupid, stupid, stupid. Anyway, what can be changed to fix the issue? Thank you!
add_action( ‘parse_query’, ‘tribe_fix_tag_query’ );
function tribe_fix_tag_query( $query ) {
if ( $query->is_tag && (array) $query->get( ‘post_type’ ) != array( TribeEvents::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( ‘TribeEventsQuery’, ‘parse_query’ ), 50 );
remove_action( ‘pre_get_posts’, array( ‘TribeEventsQuery’, ‘pre_get_posts’ ), 50 );
}
}
}
June 18, 2015 at 7:36 am #970921BarryMemberHi Joe,
I’m sorry you’ve had a rough ride after updating.
One thing that jumps out is the use of old class names, like TribeEvents – this should be updated to:
Tribe__Events__Main
We were conscious of backwards compatibility when making this change and actually you should still be able to use the old class names. If you happen to have the display of errors turned on it is certainly possible the resulting warnings could get in the way of the slider’s operation, but generally you should not display errors on a live website.
At any rate, can you try making that change? (As a sidenote, please share code via Pastebin, Gist or some similar service and paste the link in here rather than sharing it directly in forum topics 🙂 )
June 18, 2015 at 8:10 am #970936JoeParticipantI replaced all the TribeEvents with Tribe__Events__Main and it didn’t bring the slider back to life. Any other ideas? Sorry about pasting the code directly. Happy to provide access to the site should you need it.
JoeJune 18, 2015 at 9:33 am #970966BarryMemberHi Joe,
Sorry that didn’t work.
If the same code works on other sites, perhaps something else local to the problematic site is getting in the way?
What differences can you identify (different plugins/themes/customizations) and can you try temporarily switching to a setup you know works with this slider (perhaps that would be our plugins, the slider plugin and an unmodified default theme such as Twenty Fifteen) – confirm if it works then and then build back up to your full stack of plugins – testing at each stage to see if the problem has been reintroduced?
June 18, 2015 at 11:40 am #971020JoeParticipantHi,
It is very much a theme / plugin conflict. The issue happens when the Listings Theme is activated and Events Calendar is active. It is happening for the Events Calendar. All plugins deactivated other than Events Calendar and problem persists. Deactivate the Events Calendar and all returns to normal. I may just shift back to the last release of these plugins for now unless you have a better solution?
Thanks,
joeJune 18, 2015 at 11:42 am #971022JoeParticipantCould I get a download of the Events Calendar 3.9.2? or whatever the latest version was before the current version?
June 18, 2015 at 1:06 pm #971065JoeParticipantI reverted to the old plugin. Since I’m retiring this theme from the site in a month or so, it seems pointless to work at making it work. Thanks!
June 18, 2015 at 1:15 pm #971072BarryMemberOK, I’m sorry to hear that but it may be the most pragmatic way forward. One other note, if you do want to revisit this, is that references to TribeEventsQuery would need to be changed to:
Tribe__Events__Query
(Otherwise, following recent changes, WordPress will not be able to successfully “unhook” those items.)
Could I get a download of the Events Calendar 3.9.2? or whatever the latest version was before the current version?
You should be able to download all previous versions (that your licenses entitled you to) over here – and we’re generally happy to offer up access to other previous versions where needed – just let us know, here or in a new topic, if we can help on that count.
Thanks again 🙂
July 3, 2015 at 6:18 am #975139BarryMemberHi!
It’s been a while so I’m going to go ahead and close this topic.
- Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
- Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context
Thanks!
-
AuthorPosts
- The topic ‘Broken slider powered by tags’ is closed to new replies.