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

Super Cache: PayPal "Advanced Card Processing" fields missing on mobile phone only #34198

Open gl636474 opened 11 months ago

gl636474 commented 11 months ago

Impacted plugin

Super Cache

Quick summary

Only on MOBILE phone: on the WooCommerce checkout page, the following fields are blank (appear missing):

  1. Card number
  2. Expiry (MM/YY)
  3. CVV

They should appear when the "Credit Cards" payment method is selected.

Steps to reproduce

WordPress 6.4.1 with following plugins installed and active:

WooCommerce Payment Methods enabled:

On a MOBILE phone:

  1. Add a product to the cart
  2. View cart
  3. Proceed to checkout
  4. Scroll to bottom of page
  5. Select "Credit Cards" radio button

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

Each field should be a <span> containing an <iframe> (whose "src" is a hosted form from Braintree.com?) which (apparently) contains a simple HTML document containing the <input> (along with some JavaScript and a <label> which is not shown).

I say "apparently" because the <html>, <head> and <body> elements may be generated by my browser.

What actually happened

The <iframe> elements apparently just contains an HTML document with an empty <head> and an empty <body> element.

I say "apparently" because the , and elements may be generated by the phone browser and the content actually totally empty. I do not have much ability to debug the mobile phone browser.

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

No response

Logs or notes

When testing on the mobile phones, I had to refresh the phone browser to ensure it was not serving a cached version of the page with the issue present/absent.

Issue present using 4 phones:

I have disabled all plugins and enabled them one at a time, testing each time. When I enabled "WP Super Cache" the issue occurred. When I disabled "WP Super Cache" the issue disappeared. With all other plugins enabled except "WP Super Cache", the issue is not present.

donnchawp commented 7 months ago

Is this still happening, @gl636474?

The next time you try to fix this, can you enable debugging in the plugin to confirm that a cached page was delivered to the mobile client. Also, check the actual cached file. I presume you have mobile support enabled, so the cached file will have the text "mobile" in it. Check that file and see if those fields are missing in that file.

Repeat the exercise with desktop browser and check the cached file for that.

If the fields are missing in both, then they are probably populated by JavaScript and for some reason that isn't getting loaded.