Posted: January 3, 2023 at 4:44 am
Hi there – we’ve had a similar support query before, but it has suddenly got a lot worse… Every so often, all of the events on the published side of the website become inaccessible. The EE sidebar plugin continues to work, so people can click on an event name, but then are sent to a blank page saying ‘No event found’ Deactivating EE and reactivating solves the problem (so we know the fix), but we don’t know what’s causing it to happen, and sometimes only realise once we get a complaint (which isn’t ideal – who knows how many bookings we’ve lost by that point?) It used to be that updating other plugins was something that we knew to be a cause (and we now check as routine that the problem hasn’t occurred when we do that). But now seems more frequent and more random, which is a concern. I’ve deactivated all unnecessary plugins and also Google SiteKit (which is the only thing that has changed in the environment recently), but would be good to have that back… Wondering if you might be able to find some clues in our logs? Thank you! Debbie |
|
Hi Debbie, What you’re describing is usually what happens when ‘something’ forces permalinks to flush at an unexpected point during the request. So basically WordPress then generates it’s “pretty” permalink rules (which make say De-activating and reactivating Event Espresso will force EE to call a permalink flush again, which then fixes the problem but there is also an easier method. The next time this happens go to Dashboard -> Settings -> Permalinks. Don’t make any changes and just hit save. That will flush your permalinks again. Does that fix the problem at hand? —- Now, I’m not saying that’s your solution here because obviously, we don’t want the permalinks to stop working in the first place… but, if the above fixes this the next time it happens it confirms its an issue with permalinks and then we can try to troubleshoot those further (we’ve seen this before, it’s often a plugin calling to flush at some point but it could b any code and is often hard to track down). |
|
Thanks very much for this Tony – will give it a go and report back. And appreciate the explanation. |
|
I’ll give you the next step for this just incase, you can apply it now if you like but it may turn out to be unrelated. The snippet in this file: https://gist.github.com/Pebblo/a6d2b949d0ae784c09de442b9848ff7d#file-1tw_log_rewrite_rules_array-php Writes a log entry each time the permalinks are flushed and more importantly outputs the track trace for what called the flush. So if you have the above code in place and its writing to the log file correct, the next time it happens, if the above permalink fix I mentioned works the log file may show some clues as to why it happened. You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ |
|
The next time this happens go to Dashboard -> Settings -> Permalinks.Don’t make any changes and just hit save. That will flush your permalinks again. Does that fix the problem at hand? Yes, it did. So have actioned the custom functions plugin. What happens next..? Thank you! |
|
Are you comfortable with FTP/File Manager? If so, open up your sites
Replace that single line with this snippet: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug That tells WordPress to log errors on your site. You have my custom function in a plugin and it’s activated, correct? After you’ve changed the above, do the Permalink settings again and hit save. Let me know and I’ll confirm if the log entries are being added. |
|
Thanks Tony – done (I hope!) |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
Ok, so it relates to the login requests on your site. First, try adding this to your site: https://gist.github.com/Pebblo/fd47c19d038ec7b5ce0aa397ba2aacc4 Once that’s been added, delete the log file from above (I have a copy of it) and let’s see if this happens again (a new log file will be created the next time the function writes to it). |
|
OK, done. And thanks for the super-speedy response, btw. |
|
Just checking in to see if you’ve had any further reports of this? Looking over the logs it would appear not but just checking. |
|
Thank for the check-in Tony. It seems to have been stable for the past 24 hours, so fingers crossed…? |
|
OK, so a quick explanation of what the above did. We don’t run all of Event Espresso on every request so we monitor the request types and basically drop out of it if it’s nothing to do with EE. The snippet I gave you removes the check for the login requests and runs EE in the background of those. Something is flushing permalinks on those requests and becuase EE is dropping out of them, you get the above. Let’s see if it continues to work as is for now, I’ll investigate a little further if that’s the case. |
|
Will monitor & let you know if it starts to happen again. Really appreciate all of the effort you are putting in for us, thank you. |
|
The support post ‘Events disappearing from front end on website’ 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.