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 799 forks source link

[Payments] Donations Form block disappears after site transfers to AT #32614

Closed lizswafford closed 11 months ago

lizswafford commented 1 year ago

Updated this report to reflect my findings from triaging. -cuemarie

Impacted plugin

Jetpack

Quick summary

When a Donations Form block or Paid Content block are set up on a Simple site, and then the site transfers to AT, these blocks are hidden from the live site.

Steps to reproduce

  1. Start a new page on a Simple Site
  2. Add and set up each Payments block: Payment Buttons, Donations Form, and Paid Content
  3. Follow the prompts to connect your account to Stripe if needed
  4. Publish the page and view
  5. Upgrade the site and activate hosting configuration
  6. Refresh the published page

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

After transferring to AT, the Donations Block and Paid Content block should still appear on the page.

What actually happened

The Donations Form and Paid Content block don't appear.

As a workaround, disconnecting/reconnecting Stripe helps to resolve the issue.

Impact

Some

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Atomic

Logs or notes

6699482-zd

github-actions[bot] commented 1 year ago

Support References

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

cuemarie commented 1 year ago

πŸ“Œ REPRODUCTION RESULTS

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO I've been unable to replicate this so far. My AT test site shows a functioning Donations Form block in both the editor and live site, just as expected:

https://github.com/Automattic/jetpack/assets/27249804/61baba3f-8ced-4880-97c6-51fa8ab36bf4


I've seen this crop up a couple times in slack recently, though, so I know it's stumping HEs and customers alike. Example: p1692025141348829-slack-C03TY6J1A

Leaving open to see if we can spot a pattern between these reports.

πŸ“Œ ACTIONS

cuemarie commented 1 year ago

A little research into recent reports:

6699482-zen (helped by @lizswafford above)

6658947-zen / 6663025-zen (helped by @the-misha on 2023-08-14)

Unknown interaction reported by another HE, who shared:

Testing upgrading an existing site of mine with working Donation Form blocks to AT to see if I can repro...

cuemarie commented 1 year ago

πŸ“Œ REPRODUCTION RESULTS

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO Was able to replicate! On my Premium plan site, I set up a page with Payment Buttons, Donations Form, and Paid Content. Then I transferred to AT, and afterwards, the Donations Form and Paid Content blocks were hidden on the site.

Recording

(Skip ahead to 1:30s to see the site AT and the page refresh showing the problem)

https://github.com/Automattic/jetpack/assets/27249804/36f3957e-72f0-4cb4-916f-ee2acdecf0b9

πŸ“Œ ACTIONS

cuemarie commented 1 year ago

I tried disconnecting and reconnecting this site to Stripe, but it's a pretty old connection, set up in 2021. Disconnecting goes as expected, but when I reconnect, and select the same account that I had connected to this site originally, I am directed to this:

https://public-api.wordpress.com/rest/v1.1/me/stripe_connect/oauth/redirect?scope=read_write&code=ac_OV3QTPxtgTK6AxH9gAJzNMcHor2kxvgV&state=eyJibG9nX2lkIjoxOTQ4MTI0MDQsInVzZXJfaWQiOjIwMjAxODc2NCwibm9uY2UiOiIzOTc3OGM5ZWFjIiwic3JjIjoiY2FseXBzbyJ9

Image

So far all my attempts to resolve this have failed; my Earn page actually shows that I'm connected to Stripe again (after returning to the dashboard once I hit the error above), but my actual page still shows the missing blocks: https://mcqtestpremiumplan.wpcomstaging.com/earn-blocks-and-transferring-at/

Reported this part of the issue here: https://github.com/Automattic/jetpack/issues/32637

cuemarie commented 1 year ago

Update, #32637 is resolved, so I've followed up with the user who was encountering There was an error as shown above and asked them to try again on the reconnection steps to workaround this issue. Follow up happened here: 6702507-zen

millerf commented 1 year ago

Follow up happened here: 6702507-zd-a8c

Unfortunately I don't have access...

cuemarie commented 1 year ago

Unfortunately I don't have access...

Hey @millerf ! I was mainly noting that for tracking purposes. The user replied and let us know that dis/reconnecting Stripe resolved the Donations Form block issue this report is about (disappearing after site goes AT).

LMK if I can get you anything else from the interactions noted on this issue! They've all now dis/reconnected Stripe, so the users' sites are no longer presenting the problem, but the steps to resolve in the original report did consistently reproduce for me!

cuemarie commented 1 year ago

Retitled to just cover Donations form block, as we also have a report of the Paid Content block now here: https://github.com/Automattic/jetpack/issues/33151

cuemarie commented 1 year ago

Escalated here: p1695066962939419-slack-C01LXBU1N21

n3f commented 1 year ago

Until this is properly fixed this solution might work: https://github.com/Automattic/jetpack/issues/33151#issuecomment-1730527209

Running this from CLI seemed to clear this case: option update jetpack-memberships-has-connected-account 1

philnick206 commented 11 months ago

I encountered this issue in 7374275-zd-a8c

The workaround shared above resolved the issue.

n3f commented 11 months ago

See D131026-code for additional changes necessary.

n3f commented 11 months ago

Tested above change after merging update and it appears to work!

kathrynwp commented 10 months ago

Ran into this issue in 7508117-zd-a8c

Running this in CLI made the form reappear:

option update jetpack-memberships-has-connected-account 1

@n3f Any idea why the issue would still be occurring if this issue is closed? Was it ever deployed? Thank you!

n3f commented 10 months ago

If there was any sort of sync or backup applied it's possible that the setting was overwritten/deleted. It's also possible that a site owner looking at the options (and not knowing what it's for) just deleted it...

jp-imagines commented 9 months ago

Just came across another instance of this in 7731149-zd-a8c.

The above CLI command again worked, though it's strange that the issue still somewhat exists. This particular site looks to have transferred to WoA on December 6 (possibly just a few hours before the above code was merged) – not sure if that's related, but it's worth noting.

n3f commented 9 months ago

This particular site looks to have transferred to WoA on December 6

That would almost definitely be the cause. The "fix" was telling jetpack which options need to be preserved, so if the transfer occured before the plugin was updated then the option wasn't transferred with the site.