WordPress APO Plugin gives 'Bad Request' error, settings page still works?

Using WordPress Cloudflare Plugin v4.5.1

Correctly connected via API key. On load of plugin, Red bar flashes across bottom with “Bad Request” error and home screen of plugin doesn’t load. Settings screen DOES load, and development mode, Always Online, etc. features are able to be toggled on-off (and checked on CF site that settings are acknowleged).

But can’t access home screen, so can’t do ‘purge cache’

API set up via ‘Wordpress’ button on Cloudflare.

Suggestions?

7 Likes

We are having this problem too.

Also having this issue on both a root domain site & a subdomain site. Only the settings tab loads.
JS error in console:

Uncaught TypeError: a is undefined
/wp-content/plugins/cloudflare/compiled.js?ver=4.5.1:41
1 Like

Same error. I tried deleting the plugin, reinstalling and adding a fresh API Token, same result.

Also getting this error. Same js error as listed above.

Thanks for replies - sent to Support

1 Like

i am having the same problem

I just opened a ticket with Cloudflare and got the following response.

Thank you for contacting Cloudflare Support.

A 4xx Client Error is a client-side error indicating problems with your hosting provider or the client request.

To solve this issue:

  1. Ask your client to generate a HAR file
  2. Send the HAR file to your hosting provider to identify potential misconfigurations.

This is an automated response, which we hope has answered your question.
If you need further assistance, simply reply to this email to reach a Cloudflare Technical Support Engineer.

Search the Cloudflare Community for advice and insight.

So this is something on my servers end?

No, this is not on our end. It was working, now it’s not working. We did not change anything. Furthermore, parts of the plugin work, just that one part does not work. As mentioned above, there appear to be errors in the Cloudflare javascript file used in the plugin.

Agreed - I got the same response and as listed, replied to the email to say that nothing had changed on our end.

2 Likes

Hi, yep, I’m having the same issue today with multiple sites that use the plugin. This is happening on multiple hosts I use for different sites, so this has to be a problem on Cloudflare’s end.

I’m also seeing the same thing happening. No changes have been made to sites or server-side. Just started today.

2 Likes

Hi there,

Could you possibly inspect to see what is throwing that bad request? And the associated error code. Could you possibly gather a screenshot of it, when the request fires and returns the “bad request”

1 Like

@zach.connolly made reference to the JS error being thrown in the console. WordPress APO Plugin gives 'Bad Request' error, settings page still works? - #3 by zach.connolly

Here is a screenshot of it.

What is the turn around time for Clouldflare fixing something like this? I am trying to configure APO…

1 Like

Is there any actual request endpoint failing?

This is happening on our website as well. It’s messing up our website because we can’t purge our cache.

1 Like

Perhaps this is helpful… showing up in server logs when hitting the settings page for the Cloudflare plugin.

Note: I removed specific zone/IP/domain info.

2021/09/29 01:14:54 [error] 104364#104364: *1317949 FastCGI sent in stderr: "PHP message: [Cloudflare] ERROR: [CLIENT API] Array
(
[type] => request
[path] => https://api.cloudflare.com/client/v4/zones/XXXXXXXXXXX/entitlements?action=cloudflare_proxy
[timeout] => 30
[method] => GET
[headers] => Array
(
[Content-Type] => application/json
[X-Auth-Email] => REDACTED
[X-Auth-Key] => REDACTED
)
)
PHP message: [Cloudflare] ERROR: [CLIENT API] Array
(
[type] => response
[reason] => Bad Request
[code] => 400
)
PHP message: [Cloudflare] ERROR: Bad Request" while reading response header from upstream, client: XX.XXX.XXX.XXX, server: domain.com, request: "GET /wp-admin/admin-ajax.php?action=cloudflare_proxy&proxyURL=zones%XXXXXXXXXXXXXentitlements&proxyURLType=CLIENT HTTP/1.0", upstream: "fastcgi://unix:/var/run/php8.0-fpm-domain.sock:", host: "domain.com", referrer: "https://domain.com/wp-admin/options-general.php?page=cloudflare"
1 Like

This is perfect.

1 Like

Hi all, the Engineering Team has been alerted to this trouble. If you do see other users having the same problem, do log cases with Cloudflare support.

1 Like