Support

Home Forums Event Espresso Premium Need to resave permalinks or 404 occurs

Need to resave permalinks or 404 occurs

Posted: March 1, 2021 at 10:34 am

Viewing 1 reply thread


refocuseducation

March 1, 2021 at 10:34 am

Hello!

We have had this happen a few times since our site has been live…and I’ve noticed others have had the same issue. All of a sudden our event URLs come back with a 404. This is not good for potential business as it is very random. I go into the Permalinks and resave the page and it fixes the issue. It’s an easy fix, but unfortunately most times we aren’t aware of this issue until a potential student contacts us saying they are having trouble accessing the events. Why do we have to keep resave the permalinks? We have the latest version of EE installed.
Thanks!


Tony

  • Support Staff

March 1, 2021 at 11:01 am

Hi there,

If this is happening it usually means something on your site is flushing permalinks at an unexpected point in the request, before EE has added its own rewrite rules to be saved.

We can’t tell you what is doing it on the request, but we have a snippet available that logs when something calls to flush permalinks, it won’t solve the problem but should show what is causing it.

You’ll first need to add this to your sites wp-config.php file:

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

You’ll already have something like define( 'WP_DEBUG', false );, the above replaces that single line. Then add this to your site:

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

You can add that to a custom functions plugin:

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

Any calls to rewrite permalinks will be logged in /wp-content/debug.log which we can then view.

Viewing 1 reply thread

The support post ‘Need to resave permalinks or 404 occurs’ 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