• Resolved maikewng

    (@maikewng)


    I have a very weird situation happening. On a website I am developing I get the infamous “Red error” when I try to display a public calendar via Gutenberg block.
    A first investigation has shown that the response from admin-ajax.php is the following:
    {"error":"Request failed.","errorCode":0,"errorDescription":""}
    The website is a fresh installation with very few plugins installed (Jetpack and Contact Forms 7). The issue happens also when every other plugin is disabled or removed.

    The tricky bit is that IT DOES NOT HAPPEN with an extremely similar website that I am also working on. Same version of the plugin, same API key, same public calendar, but different hosting provider. Indeed the POST request to admin-ajax.php seems to be exactly the same, while the response is different.

    Do you have any suggestion or investigation I could help you with?

    Thank you so much for your efforts!

    EDIT: Another fundamental difference that I encountered is that on the site in which it DOESN’T WORK the request headers report HTTP2 protocol is in use, in the site in which it DOES instead HTTP1.1 is used.

    • This topic was modified 5 years, 2 months ago by maikewng. Reason: Additional info over HTTP protocols
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author michielve

    (@michielve)

    Hi,

    One thing I can think of is that you’ve set some restriction (domain or IP) on your API key? That can explain why it’s successful on one website and not on the other.

    Another thing is that the referer header is not set in the AJAX request to admin-ajax.php. I’ll sent the referer to the Google call, so maybe if this is not set, Google doesn’t allow it.

    If you could share the link to the problematic webpage, I can have a look.

    Best wishes,
    Michiel

    Thread Starter maikewng

    (@maikewng)

    Thanks for the quick reply!

    I figured out eventually, seems to be due to some restrictions on my hosting. I opened a pull request on Github with a patch that works well in my case. Feel free to merge it or give suggestions.

    Michele

    • This reply was modified 5 years, 2 months ago by maikewng.
    Plugin Author michielve

    (@michielve)

    Hi,

    I released a new version (20200117) with a fix for this. I didn’t use curl but wp_remote_get and wp_remote_post as these functions do a lot of tests behind the scene.

    Thanks for letting me know this problem exists and in helping me to understand this problem!

    Best wishes,
    Michiel

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No response from admin-ajax.php’ is closed to new replies.