Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Paid Content Block - Caching Issue for showing correct content on buttons #34948

Open janmckell opened 9 months ago

janmckell commented 9 months ago

Impacted plugin

Jetpack

Quick summary

A user had added 3 different payment plans and payment buttons, but all the buttons were redirecting to the first payment plan only.

If they reload the page, however. then all the buttons link to the correct payment plan.

Tested this further and it looks like a page caching issue with the blocks.

See this screen record: https://github.com/Automattic/jetpack/assets/84089207/9d8cdb1b-fa7d-4333-b785-bb932bb59c1d

As a workaround, an HE suggested that they create 3 different pages and have payment buttons linked on each of the pages. Then, on the Store page, create 3 columns with buttons that'd link to those pages.

Steps to reproduce

Add multiple payment plans Add each plan to a payment button on a page Save the page Test or preview the page All buttons link to the same payment plan, until the page is reloaded and then each button links to its own (and the correct) payment plan.

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

Each button should link to the correct payment plan, without the need to refresh the page first.

What actually happened

No response

Impact

One

Available workarounds?

Yes, difficult to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

No response

janmckell commented 9 months ago

Reported here: 7474952-zd-a8c

github-actions[bot] commented 9 months ago

Support References

This comment is automatically generated. Please do not edit it.

anomiex commented 9 months ago

A user had added 3 different payment plans and payment buttons, but all the buttons were redirecting to the first payment plan only.

If they reload the page, however. then all the buttons link to the correct payment plan.

I see slightly different behavior when I tried reproducing this: whichever button is clicked first (after loading or reloading the page) shows the plan(s) associated with that button as expected. Closing the modal and clicking any other buttons re-shows the modal without updating the contents.

github-actions[bot] commented 3 months ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.