Support » Plugin: The Events Calendar » Events Page 404

  • Howdy_McGee


    I have a WAMP (localhost) install and the Events archive is always 404.

    I’ve tried changing the slug in Settings to upcoming and test, re-saving permalinks after each change and it continues to be 404.

    I’ve installed the WordPress Health Check & Troubleshooting plugin to disable all other plugins and revert to a default theme and it continues to be 404.

    The single posts do not 404, the link back from the single page does 404.

    My other custom post types do not seem to have issues.

    The HTAccesss rewrite looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wprojects/mywp/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wprojects/mywp/index.php [L]
    # END WordPress

    The debug log doesn’t display anything meaningful when viewing the events archive page or any of the other pages. When I enable debuggin within the plugin settings I get this repeated to show that it’s logging errors:

    [04-Sep-2019 20:56:30 UTC] the-events-calendar/common - Log: Initializing Tribe Events on Sep, 4th at 08:09:30 pm

    I have 1 event that starts Aug 1st and ends Sept 30th for testing purposes.

    What else can I do to debug why the events archive is 404ing?

Viewing 1 replies (of 1 total)
  • Howdy_McGee


    I now realize the below will not work because of the dynamic pagination.

    – – – – – – – – – –

    Quality plugins have all the necessary hooks, kudos! I was able to filter the post type arguments and define the archive slug statically:

     * Filter Tribe Events Post Type Arguments
     * - Some reason the plugin does not accept the settings archive slug
     * - Set it statically in <code>has_archive</code>
     * @param Array $args	- register_post_type arguments
     * @return Array $args
    function prefix_tribe_events_type_args( $args ) {
    	$args['has_archive'] = 'events';
    	return $args;
    add_filter( 'tribe_events_register_event_type_args', 'prefix_tribe_events_type_args' );

    Previously, the has_archive was set to true. I’m not quite sure why this solves the issue or why the issue occurred in the first place.

    Any suggestions around this so I can use the settings slug instead would be great but the above code squares it fine.

Viewing 1 replies (of 1 total)
  • The topic ‘Events Page 404’ is closed to new replies.