• Resolved TeamITS

    (@teamits)


    At some point after migrating a site we discovered changing pages in Event Calendar doesn’t work.

    example.com/wp-json works in a browser.

    example.com/wp-json/tribe/views/v2 works. Other endpoints work.

    example.com/wp-json/tribe/views/v2/html logs an error like “…[error] 3916993#0: *3616844 openat() “/var/www/vhosts/example.com/httpdocs/wp-json/tribe/views/v2/html” failed (2: No such file or directory)…” in proxy_error_log on Plesk. At this point the site shows an empty page (header and footer only).

    If I type in the example.com/httpdocs/wp-json/tribe/views/v2/html URL the browser redirects to the site home page.

    If we open the < or > or other links on a calendar page in a new tab the page opens and displays correctly.

    Any ideas on why /html is not found?

    • This topic was modified 3 months, 3 weeks ago by TeamITS.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @teamits ,

    Thank you for reaching out.

    This can be due to outdated permalinks database or caching and performance solutions so I recommend starting with those:

    Thread Starter TeamITS

    (@teamits)

    Thanks for the reply. We had regenerated permalinks; I did it again to no avail. We had changed from Post to something else, and back again.

    We have no cache plugins installed. The closest this site comes is it has a “expires 30d;” tag that would apply to .css files.

    “Enable the Month View Cache” is unchecked.

    Plugin Support Darian

    (@d0153)

    Hi there,

    Thank you for your response. To assist you better, could you please provide the URL of your website so we can take a closer look? This will help us investigate the issue further.

    Thread Starter TeamITS

    (@teamits)

    sure, it is hinsdale.church/events

    (also the “expires” tag would apply to various image files, just not .js)

    Also as I reread my OP, I need to correct something…the error is logged when trying to click links in the calendar/event listing. The /html URL redirects to the site home page because it’s 404, as I wrote.

    Plugin Support Darian

    (@d0153)

    Hi @teamits

    Thanks for your response.

    After checking, it looks like there may be a conflict on your site. To help isolate the cause, could you please try activating only our plugins along with a default theme such as Twenty Twenty One, then check if the issue still occurs?

    If the issue is resolved, please reactivate your plugins and theme one at a time, testing after each step, to identify which one may be causing the conflict.

    This should help narrow things down, and we can take it from there.

    As always, please make sure to run these tests on a staging version of your live site to avoid impacting production.

    You can follow this guide from The Events Calendar on how to set one up:
    https://theeventscalendar.com/knowledgebase/how-to-set-up-a-staging-site-for-your-wordpress-website/

    Thread Starter TeamITS

    (@teamits)

    The main person working on this site has been out a couple days. Will try to test further.

    Previously I’m told he did try disabling plugins and a default theme, as per your site, to no avail. However using a preview in WordPress of another theme works fine, for the links on the event/calendar page.

    Plugin Support tristan083

    (@tristan083)

    Hi @teamits ,

    Thank you for your message and the update.

    Please feel free to let us know how things go or if you have further questions/concerns.

    Plugin Support Darian

    (@d0153)

    It looks like this thread has become inactive, so I’ll go ahead and close it for now.

    Please feel free to reopen this thread or start a new one if you have any further questions or concerns—we’re always happy to help.

    Thread Starter TeamITS

    (@teamits)

    Hi, he did verify today that what I wrote above was correct, that it didn’t work with plugins disabled and a WP theme.

    Plugin Support Darian

    (@d0153)

    Thanks for your response.

    However using a preview in WordPress of another theme works fine, for the links on the event/calendar page.

    Were you able to try activating the said theme and see if it actually resolves the issue? If so, then the issue might be coming from your theme that is in conflict with our plugin.

    I took a closer look at the issue further, and I can confirm what’s happening.

    When the AJAX request is sent to the following REST endpoint:

    /wp-json/tribe/views/v2/html

    the server responds with a 301 redirect and forwards the request to the site’s homepage instead. Because of this redirect, the request never reaches the REST API, which causes the AJAX call to fail.

    REST API and AJAX requests are expected to return a 200 response. Redirects—especially 301s—will break these requests and prevent features like Past Events navigation, pagination, or filtering from working correctly.

    This behavior is typically caused by a redirect rule or configuration on the site, such as:

    • A forced canonical redirect from an SEO plugin
    • HTTP → HTTPS or domain normalization rules
    • A security or firewall plugin blocking REST requests
    • Server-level redirects in .htaccess, Nginx, or Cloudflare

    To resolve this, please ensure that any redirect rules explicitly exclude REST API requests, particularly:

    /wp-json/*

    As a quick test, you can try temporarily disabling SEO, security, or caching plugins to identify whether one of them is triggering the redirect. Additionally, accessing the REST endpoint directly in a browser should return JSON—if it redirects instead, that confirms the issue is happening before WordPress can process the request.

    Once the redirect is removed or adjusted to allow REST API requests, the AJAX functionality should work as expected. Let me know how it goes.

    Thread Starter TeamITS

    (@teamits)

    Any idea why it works if we open the link in a new tab/window?

    Will triple check but we had disabled Plesk security and other plugins to test, previously.

    Plugin Support Darian

    (@d0153)

    This is because the calendar layout is loaded during the initial page load rather than via an AJAX request.

    Please feel free to let us know how it goes or if you have any further questions or concerns.

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.