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.57k stars 796 forks source link

Tiled Gallery: srcset and src links don't update correctly when a custom domain is set; image selection modal reports 'you are probably offline' #34561

Open Nic-Sevic opened 7 months ago

Nic-Sevic commented 7 months ago

Impacted plugin

Jetpack

Quick summary

context: p9F6qB-dTe-p2

user has tiled galleries with srcset and src pointing at default domain despite custom domain being set seems like if the images aren't first cached by photon before the domain is changed, this breaks the gallery

On my test site the gallery images show despite the domain changes but I think this is just because caching hasn't expired yet? Manually changing the domain in the src link causes things to load fine so it seems like a search and replace may work as a workaround

Steps to reproduce

  1. with default domain set, create tiled gallery
  2. set custom domain as primary, see how data-* links change but not src/srcset
  3. try to add a new gallery on the same page and get 'you are probably offline' or endlessly loading gallery pop-up (can't add new gallery)

This persistence also happens when you start with a custom domain

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

expect all links to change to current primary domain expect to be able to add gallery images regardless of which domain primary

What actually happened

When trying to add a new gallery after switching from default to custom domain 2023-12-11 at 11 26 2023-12-11 at 11 28

starting with custom domain: 2023-12-11 at 11 33

updating to default: 2023-12-11 at 11 34

Impact

All

Available workarounds?

Yes, difficult to implement

Platform (Simple and/or Atomic)

Atomic

Logs or notes

No response

jeherve commented 7 months ago

A search and replace should help here, although it would be interesting to figure out how the gallery was first created ; I would expect such links to be automatically updated when site owners launch their site. If that's not the case today, maybe that's something that should be fixed in our launch process.

Nic-Sevic commented 7 months ago

When I tested I was duplicating on a site that was already launched and public I wasn't able to get the galleries to fail to load like the user is seeing though.

I can ask the user and report back about their specific galleries in general they say it's been happening for a few months

Nic-Sevic commented 7 months ago

@jeherve user provided more info

github-actions[bot] commented 1 month 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.