Support

Home Forums Event Espresso Premium Event page display issues

Event page display issues

Posted: August 25, 2020 at 12:39 am

Viewing 3 reply threads


FLEETAdmin

August 25, 2020 at 12:39 am

We’ve been using EE4 and from time to time the issue of displaying the event page comes up. This issue comes and goes without any intervention from page admins…

The main page displaying all events work fine but when you click to see details of a particular event, the page goes to “Oops, the page you’re looking for is no longer here…”. This issue happens to all events, regardless of their status (upcoming, active, inactive, past)…

There is nothing in the backend that our developer can figure out. The problem tends to happen unexpectedly, sometimes for a few hrs at a time and then everything works again after…

Has this happen to anyone else using EE4? We previously used EE3 and never had this issue, is this a known issue with the upgrade version?


Tony

  • Support Staff

August 25, 2020 at 4:11 pm

Hi there,

It sounds like permalinks are being flushed at an unexpected time which means EE hasn’t added it’s rewrite rules, then a little later it’s happening on a different request and at that point, EE has added the rewrite rules.

We’ve seen the first part of the above happen before but couldn’t reproduce to narrow down the cause further. The fact that your site ‘fixes’ itself a little later is odd but still points to permalinks.

When you say the ‘main page’, is that the /events/ output or another page using [ESPRESSO_EVENTS] (or another EE shortcode)? The reason I ask is /events/ should also break if permalinks need to be flushed.

It’s hard to give you a solution for this without more detila sbut I can give you the steps I would take to narrow this down.

First, enable WP_DEBUG but set it to only log errors using this:

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

That tells your site to write all logs to /wp-content/debug.log

Then add this to your site: https://gist.github.com/Pebblo/a6d2b949d0ae784c09de442b9848ff7d

It’s a plugin that writes the rewrite rules to the log file each time permalinks are flushed with a stack trace for what called the flush.

The problem with the above is you then need to wait until it happens again and go through that log file to see when the permalinks are flushed, it doesn’t fix anything as is.

There is one request in which we known the rewrite rules are not added and it’s for the wp-login request as intentionally doesn’t run on those requests, however, you can add this snippet:

https://gist.github.com/Pebblo/fd47c19d038ec7b5ce0aa397ba2aacc4

Whish tells EE to continue to load there, which may or may not solve the problem.


FLEETAdmin

August 25, 2020 at 6:30 pm

Hi Tony,

Thanks for the quick response…

Yes we use [ESPRESSO_EVENTS] short code to display events on our webpage. They actually load fine, the error message only pops up when you click on the event to see its details – which directs to the event link. The same is experienced if I access the “view” option from the event edit window.

It does sound like it’s related to page “links”… we’ll look into permalinks and the steps you’ve suggested to find out more…


Tony

  • Support Staff

August 26, 2020 at 3:15 am

Yes we use [ESPRESSO_EVENTS] short code to display events on our webpage. They actually load fine, the error message only pops up when you click on the event to see its details – which directs to the event link. The same is experienced if I access the “view” option from the event edit window.

Yeah that would be ‘expected’ in that case, [ESPRESSO_EVENTS] loads the events but when you visit the URL for the event it’s using rewrite rules we add for the custom post types, if they aren’t saved within WordPress the link will fail.

It will actually work if you change it to use ?espresso_events={event_slug} in place of \events\{event_slug}, which obviously I don’t expect you to do it just shows that the issue is with ‘pretty’ permalinks when it happens.

It does sound like it’s related to page “links”… we’ll look into permalinks and the steps you’ve suggested to find out more…

The first snippet I gave you logs the flush permalinks call and has a simple check to confirm if the /events/ endpoint is saved. So to confirm it’s working add that plugin and go to Dashboard -> Settings -> Permalinks, click save.

Then on your site go to /wp-content/debug.log and check the output, the rewrite ruleslogged should have the events slug set and EE_Check should be true, when that’s false, whatever called the flush was on a request that didn’t set EE’s rewrite rules, we’ll need that specific log entry to investigate further.

Viewing 3 reply threads

The support post ‘Event page display issues’ 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