cloudflare / Cloudflare-WordPress

A Cloudflare plugin for WordPress
https://www.cloudflare.com/wordpress/
BSD 3-Clause "New" or "Revised" License
208 stars 84 forks source link

Unauthorized error when attempting to purge cache for individual pages #497

Closed toddbenton closed 1 year ago

toddbenton commented 1 year ago

Confirmation

WordPress version

6.0.3

Cloudflare-WordPress version

4.11.0

PHP version

8.0

Expected result

Expected to be able to clear cache of individual pages.

Actual result

Unauthorized error message appears at the bottom of the page. Purge everything works fine. Purge individual pages from Cloudflare website also works fine. Screen Shot 2022-10-26 at 9 44 33 AM

Steps to reproduce

  1. Go to purge cache section of plugin homepage in WordPress dashboard.
  2. Click Purge Cache button
  3. Choose Purge Individual Files
  4. Enter any url on the website.
  5. Unauthorized message appears at the bottom of the screen (see screenshot in the previous section)

Additional factoids

No response

References

No response

zaidoonhad commented 1 year ago

Hi @toddbenton we would like more information in order to be able to debug. Can you create a support ticket here: support.cloudflare.com. And include the API request (without the api token) you are sending (or the plugin is sending in this case) and the api response, you can attempt to purge via API directly and include the call and the response if you are not able to see the debug logs for the plugin. The api for purging cache is documented here: https://api.cloudflare.com/#zone-purge-files-by-url

Once you do that, please include the ticket number here and we can look at this for you. Thanks!

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.