wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
699 stars 218 forks source link

Cloudflare cache is not cleared when posts are published or edited by Editor or Author user #5299

Open NataliaDrause opened 2 years ago

NataliaDrause commented 2 years ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug When Cloudflare Cache Everything is activated via page rules, our Cloudflare add-on doesn't clear cache when a user with Author or Editor user role edits or publishes a post.

The condition is set on this line: https://github.com/wp-media/wp-rocket/blob/088246e67df6a0b54f1e94588584412ef0f9b6dc/inc/Addon/Cloudflare/Subscriber.php#L174 and it prevents code to run further.

To Reproduce Steps to reproduce the behavior:

  1. Enable Cache Everything in Cloudflare.
  2. Enable and configure Cloudflare add-on in WP Rocket.
  3. Create a user with Author or Editor user role;
  4. Edit or publish a post by this new user;
  5. Cloudflare cache will not be cleared, while WP Rocket cache is cleared as expected.

Expected behavior Cache for posts and related URLs should be cleared when a post is published or edited by any users as done for WP Rocket cache.

Additional context Slack thread: https://wp-media.slack.com/archives/C43T1AYMQ/p1660047435095269 Ticket: https://secure.helpscout.net/conversation/1967812788/359694?folderId=3864740

Backlog Grooming (for WP Media dev team use only)

Plinpod commented 1 year ago

Seeing same behaviour for all user types

rfischmann commented 1 year ago

How hard it is to fix this? I can't use Cloudflare's integration on WP Rocket because of it, and I've been waiting for a fix for many months…

rfischmann commented 1 year ago

Anyone?…

samlangdon commented 2 months ago

+1