Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

[Bug][HC]: Donation Forms tabs don't load properly Classic Themes with Infinite Scroll #88902

Open pak-cia opened 7 months ago

pak-cia commented 7 months ago

Quick summary

Donation forms that have multiple terms and tabs (One-Time, Monthly, Yearly) configured do not load properly if the post that contains the form is loaded by Infinite Scroll.

Steps to reproduce

I've replicated this at my test site: https://pakcia.wpcomstaging.com/ 1 - Create a post that includes a Donations Form Block 2 - Active theme be a Classic Theme that supports Infinite Scroll 3 - Have enough posts so that the post that contains the Donations Form Block gets loaded by Infinite Scroll 4 - The Donations Form Block doesn't display properly and only displays text: https://prnt.sc/Ln1Gc05UBUWX

What you expected to happen

Expect that the post properly loads its content and that the Donations Form Block would be displayed properly and usable.

What actually happened

Post content doesn't load properly and the Donations Form Block is unusable.

Browser

Google Chrome/Chromium

Context

User reported issue in: 7776978-zen

Platform (Simple, Atomic, or both?)

No response

Other notes

Seems to be caused by Infinite Scroll not loading the scripts required for the Donations Form Blocks because its loaded after, or the Infinite Scroll isn't calling the scripts. If the post loads within the "infinite-wrap" div, it won't work. Example screen here shows donation form in "post 5" hasn't loaded as it's within the infinite wrap div, but above it the form displays properly: https://prnt.sc/B6Ry3C_4bXTu

Tested with the following themes: Independent Publisher 2 Twenty Nineteen

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

No but the platform is still usable

Workaround details

No response

github-actions[bot] commented 7 months ago

Support References

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

liviopv commented 7 months ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO Replicated https://github.com/Automattic/themes/assets/14153300/7c2804e8-46dc-4f22-906f-76482229a8fe

📌 ACTIONS