jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Subscription block stops caching for admin users

Open donnchawp opened this issue 1 year ago • 0 comments

Impacted plugin

Jetpack

Quick summary

The Subscriptions block at extensions/blocks/subscriptions/subscriptions.php sets DONOTCACHEPAGE on line 1033 when an admin user is logged in regardless of whether a subscription block is being shown on the current page.

ref: p1707741294383739/1707737397.873219-slack-C016BBAFHHS

Steps to reproduce

  1. Enable the newsletter feature in Jetpack.
  2. In WP Super Cache enable caching for all
  3. Enable debugging in WPSC
  4. Visit the blog as an admin user and note that DONOTCACHEPAGE is set so that no caching is done.

A clear and concise description of what you expected to happen.

The page should be cached as WP Super Cache is configured to allow it.

What actually happened

The page was not cached.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

No response

Logs or notes

Instead of checking for the admin user, it should probably check for the subscription cookie, I think. I haven't used the premium features of this block and I'm not 100% certain how it works.

donnchawp avatar Jul 02 '24 08:07 donnchawp