G5-Hawks
November 13, 2024 at 12:47 pm
Hello, we use Event Espresso – Calendar (EE 4.3+) on this site:
https://www.hawksclub.co.uk/events/
The events are only rendering for logged in users.
There are no error messages, and I can’t find any reason for the fault.
The events are output on the page using the shortcode [ESPRESSO_CALENDAR show_expired=true]
Please could you point me in the direction of how to solve it?
Thanks
Tony
November 14, 2024 at 6:45 am
Add New Note to this Reply
Hi there,
The calendar uses an Ajax request to pull in the events.
Do you have a plugin that is limiting resources to only logged-in users? It may also be blocking access to /wp-admin/admin-ajax.php
If I go here:
https://www.hawksclub.co.uk/wp-admin/admin-ajax.php
I see 0
returned (that’s expected).
But as soon as I add an action:
https://www.hawksclub.co.uk/wp-admin/admin-ajax.php?action=get_calendar_event
Or:
https://www.hawksclub.co.uk/wp-admin/admin-ajax.php?action=test
It redirects me to the homepage.
G5-Hawks
November 14, 2024 at 9:10 am
Add New Note to this Reply
Thanks Tony – that was very helpful! You gave me enough information here to solve it.
There was a redirect stopping non-admin users from accessing wp-admin, I’ve excluded ajax requests from the redirect with !is_doing_ajax() and now the calendar is fully functioning again.
Thanks for your help!
Tony
November 14, 2024 at 5:10 pm
Add New Note to this Reply
You’re most welcome, I’m glad you got it working.