Support

Home Forums Event Espresso Premium 404 Error – Permalinks

404 Error – Permalinks

Posted: March 9, 2021 at 5:59 pm

Viewing 1 reply thread


cgigar

March 9, 2021 at 5:59 pm

We have been experiencing an intermittent 404 Error on the main event page link. When we refresh the permalinks it clears the error and the page loads, but it reoccurs within a day or so.

What can be done to find a permanent fix to this error?


Tony

  • Support Staff

March 10, 2021 at 3:24 am

Hi there,

When this happens it usually means there is something on the site flushing permalinks at an unexpected point in the request (before EE has added its rewrite rules). I can’t tell you what that is from the info you currently have but I do have a snippet that can help narrow this down.

https://gist.github.com/Pebblo/a6d2b949d0ae784c09de442b9848ff7d#file-1tw_log_rewrite_rules_array-php

Add that to a custom functions plugin on the site:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Then, enable WP_DEBUG_LOG using this snippet in your wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

You’ll already have something like define( 'WP_DEBUG', false );, that snippet replaces that single line.

What that will do is create a log entry in /wp-content/debug.log each time permalinks are called to be flushed with a stack trace of what called it. So when it then happens again we can check that log entry to see what called it and then hopefully investigate further from there.

(Note the debug.log file is publicly available so I don’t recommend keeping this enabled for longer than needed and when done, remove the snippet and delete the file).

Viewing 1 reply thread

The support post ‘404 Error – Permalinks’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso