Cannot Purge CloudFlare Cache: Please Enter CloudFlare e-mail
-
Hello there,
I’m using W3 Total Cache v0.9.4.1 and WordPress 4.2.2 CloudFlare extension for W3TC is configured and enabled.
But, even changing CloudFlare settings from W3TC (development mode, minify, Rocket Loader and Security) works, it’s impossible to Purge cache because of error
Cannot Purge CloudFlare Cache: Please Enter CloudFlare e-mail
This has been caused because in /wp-content/plugins/w3-total-cache/extensions/CloudFlare/general-settings-box.php file you run w3_ui_element() function to generate input fields, but for second parameter (ID) instead to provide proper id values cloudflare_email/cloudflare_key/coludflare_zone you send cloutflare.email/cloudflare.key/cloudflare.zone and these are invalid ID’s.
Then, in file /wp-content/plugins/w3-total-cache/pub/js/options.js you have function w3tc_cloudflare_api_request() with validating that three parameters:
var email = jQuery('#cloudflare_email'); var key = jQuery('#cloudflare_key'); var zone = jQuery('#cloudflare_zone');
but as you have wrong ID’s set for inputs, this email.val() will return undefined and fail validation.
I changed ID values to proper wording (underscore instead dot) in general-settings-box.php file and this initial validation pass, AJAX post on line #332 fails and I receive message
Request failed. Error: unknown
Can you please help and fix first problem with wrong ID’s in general-settings-box.php and then also see what’s wrong with that latter request.
Thank you,
Aleksandar
- The topic ‘Cannot Purge CloudFlare Cache: Please Enter CloudFlare e-mail’ is closed to new replies.