Broken slider powered by tags

Home Forums Calendar Products Events Calendar PRO Broken slider powered by tags

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #970227
    Joe
    Participant

    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 );

    }

    }

    }

    #970921
    Barry
    Member

    Hi 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 🙂 )

    #970936
    Joe
    Participant

    I 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.
    Joe

    #970966
    Barry
    Member

    Hi 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?

    #971020
    Joe
    Participant

    Hi,
    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,
    joe

    #971022
    Joe
    Participant

    Could I get a download of the Events Calendar 3.9.2? or whatever the latest version was before the current version?

    #971065
    Joe
    Participant

    I 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!

    #971072
    Barry
    Member

    OK, 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 🙂

    #975139
    Barry
    Member

    Hi!

    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!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Broken slider powered by tags’ is closed to new replies.