• Hi there!

    I previously had this issue with a demo site for our hockey team a few months back. With your help and my service providers help, we managed to repair the issue. The whole thing was discussed in this topic: https://wordpress.org/support/topic/future-events-not-working-permalink-flushes-only-making-things-worse/?replies=6

    For some reason, possibly due to updates in either WordPress or Sportspress or both, the issue has reappeared. The site has been migrated into a new domain at http://sohosportingsociety.com/sohohc. Nothing on the site configuration has been changed on my or my service providers part.

    As a recap, here’s the issue: when I try to preview a future event on the site, I get a “Oops! That page cannot be found” error message. Changing permalinks usually helps but when I do so, I get a 404 error on the whole site, with every page. We managed to track this issue to Nginx based servers and corrected the issue with some config tweaking but this time, for some reason, this doesn’t seem to help.

    Finally, just to clarify, the issue only appears when I’m NOT logged into WordPress.

    Any clues?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Roch

    (@rochesterj)

    Hi!

    Would you mind sending us a screenshot of your wp-admin section for one of these events? In specific the part where you set the time for the event (but if you could send the whole page that would be even better)

    Kind Regards,
    -Roch

    I had a similar issue, even after flushing permalinks. For me it only occurs when there are multiple events on one day in a calendar view. Clicking on the date in the calendar takes you through to a page listing the events. If the events are in the future (i.e. scheduled) the hyperlink for each event on this page is in the format:

    http://<domain>/?post_type=sp_event&p=<post id>

    This link works when I am logged in as admin, but gives the ‘Oops! That page can’t be found’ error when not logged in.

    In the calendar list view, the link to the same event is in the format:

    http://<domain>/event/<post id>/

    This link works whether logged in or not.

    I looked in more detail at the content-page.php from the rookie theme and this uses get_permalink() to generate the link, whilst in the event-list.php from the SportsPress plugin uses get_post_permalink( $event->ID, false, true).

    So I changed content-page.php for the rookie theme to the following:

    	<!-- If it is not a page - use get_post_permalink with sample option set to true -->
    	<?php if ( ! is_single() && ! is_page()) { ?>
    		<a href="<?php echo esc_url(get_post_permalink(0,false,true)); ?>">
    	<?php } ?>
    
    	<header class="entry-header">
    		<?php if ( has_post_thumbnail() ) { ?>
    			<div class="entry-thumbnail">
    				<?php the_post_thumbnail( 'large' ); ?>
    			</div>
    		<?php } ?>
    			
    		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    		
    	</header><!-- .entry-header -->
    
    	<?php if ( ! is_single() && ! is_page()) { ?></a><?php } ?>

    Now this seems to return the correctly formatted permalink.

    Regards

    John

    Hi John
    this looks exactly like the issue that I have on my site and which I posted about earlier in the week 404 errors navigating from Calendar event list . Is this an change to the existing code block in content-page.php (below) or an additional code block within it? Would it be possible to share the entire code segment to be sure of what needs to be amended.

    Many thanks
    John

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <?php if ( ! is_single() ) { ?>“><?php } ?>

    <header class=”entry-header”>
    <?php if ( has_post_thumbnail() ) { ?>
    <div class=”entry-thumbnail”>
    <?php the_post_thumbnail( ‘large’ ); ?>
    </div>
    <?php } ?>

    <?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ); ?>
    </header><!– .entry-header –>

    <?php if ( ! is_single() ) { ?><?php } ?>

    <div class=”entry-content”>
    <?php the_content(); ?>
    <?php
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . __( ‘Pages:’, ‘rookie’ ),
    ‘after’ => ‘</div>’,
    ) );
    ?>
    </div><!– .entry-content –>
    </article><!– #post-## –>

    hi, @vrissanen your version is pro or free,

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Future events, the Oops! page and 404 error reappeared!’ is closed to new replies.