• Resolved Jonathan Stegall

    (@jonathanstegall)


    I recently upgraded our installation of The Events Calendar from 5.16.4 to 6.0.4. I ran the database upgrade, modified our theme templates, etc. and everything seemed to be going smoothly. However, I’ve realized that the template wp-content/plugins/the-events-calendar/src/views/v2/default-template.php is being loaded on category archive pages when it shouldn’t be, and it causes a redirect. I’ve downgraded our live version so that it doesn’t do this, but I’d like to find out if there’s something in our theme that is causing this.

    Compare https://www.minnpost.com/artscape/page/2/ to https://stage.minnpost.com/artscape/page/2/. On the live site, that page loads a normal archive, but on the stage site it redirects instead to https://stage.minnpost.com/events/list/page/2/.

    Things I’ve already tried to resolve this:

    1. Deactivate all functions.php methods in my theme.
    2. Remove the tribe and tribe-events folders from my theme.
    3. Remove my theme’s archive.php and index.php files.

    Doing all of these things together results (on my local installation) of a URL that is https://minnpost-wordpress.test/arts-culture/page/2/ but that still loads the event feed and shows wp-content/plugins/the-events-calendar/src/views/v2/default-template.php as the active template.

    When I switch to the twentytwentytwo theme, this issue goes away and I can see the second page of the arts & culture category, as I should. But when I switch to another theme that isn’t mine, the event template comes back on this URL.

    Clearly it does appear to be theme related, but without any customization remaining in my theme’s templates or functions, I’m at a loss as to what it could be. Do you have any guidance for where I could find what might be causing this?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jonathan Stegall

    (@jonathanstegall)

    I’ve noticed that at least for the time being, I can add this to my theme:

    if ( ! function_exists( 'minnpost_largo_event_template_hierarchy' ) ) :
    	add_filter( 'tribe_events_views_v2_use_wp_template_hierarchy', 'minnpost_largo_event_template_hierarchy', 10, 4 );
    	function minnpost_largo_event_template_hierarchy( $hijack, $template, $context, $query ) {
    		$hijack = true;
    		if ( is_post_type_archive( 'tribe_events' ) || is_singular( 'tribe_events' ) ) {
    			$hijack = false;
    		}
    		return $hijack;
    	}
    endif;

    This allows my events to work as they should without breaking pagination on other archives.

    But again, do you have any sense of why this would be necessary, in a theme without any other customization?

    Plugin Support Abz

    (@abzlevelup)

    Hi @jonathanstegall, apologies for the delay here. For me to understand and learn more about your setup, could you provide the following version of the following?

    1. PHP
    2. WordPress
    3. The Events Calendar
    4. Theme and Version

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    This thread has been inactive for a while, so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up, and we’d be happy to help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Version 6.0+ causes a redirect from category/page urls and loads TEC template’ is closed to new replies.