Posted: January 29, 2024 at 8:17 am
I’m having issues with a website running EE4 where the registration links periodically show a 404. I’ve followed the instructions from https://eventespresso.com/topic/event-slug-404-error-page/ to enable logging of permalink flush requests and have collected data from the past few months. It seems like Here is an example of the stack trace. The ‘rewrite_array’ is missing the “registration/” paths. Is it possible to have event espresso add the permalinks on the shutdown action? Please let me know if you need any other info. Thanks! |
|
Hi there, If you make the same change mentioned here: https://eventespresso.com/topic/event-slug-404-error-page/#post-318420 Only using ‘registration’ as the slug:
It will show the correct value in the logs when EE’s rewrite rules are missing. I’m fairly certain EE already runs on the shutdown hook but I’ll double check this with out developers. Note, these are often difficult to track down, it’s not caused by EE specifically (otherwise everyone would run into it) but a combination of EE another some code/another plugin/theme… so this is going to take some troubleshooting to narrow down. |
|
thank you. I’ve updated the logging with the correct code for the EE_check. Please let me know if EE runs on the shutdown hook. |
|
Hi there, So I checked into this and EE loads the CPT’s on the We do try to limit the requests that EE loads on so it only loads when it is actually intended to be used and something there may be getting messed up. You could try logging the request itself when the rewrite rules are missing and see if that adds any more details for this. The EE_check is now correct, right? If so, you can add something like this:
(If the E rewrite rule is set, return the rewrite rules as we don’t need to log them) Add that right above Then… in the call to ee_write_log, add this:
Manually flush your permalinks in Dashboard -> Settings -> Permalinks to double check no fatals are thrown and then wait for this to happen again and check the log file, an details on the specific request there? |
|
I updated the EE_check yesterday to it accurately reflected whether |
|
You’re most welcome, these can often be a little difficult to track down so just need to keep chipping away. |
|
The support post ‘Missing permalinks after shutdown and wp_loaded actions’ 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.