amnestywebsite / humanity-theme

The Amnesty International WordPress Humanity Theme
https://wordpresstheme.amnesty.org/
Other
23 stars 9 forks source link

On the Multisite Global Media plugin it doesn't hook into `wp_get_attachment_url` #42

Open jaymcp opened 7 months ago

jaymcp commented 7 months ago

Describe the bug
The Multisite Global Media plugin doesn't hook into wp_get_attachment_url, which impacts some of our blocks when they reference media uploaded to a different site.

Blocks understood to be affected:

To Reproduce
Steps to reproduce the behaviour:

  1. On a multisite, activate the Multisite Global Media plugin
  2. On the main site, upload a video
  3. On a subsite that isn't the main site, visit WP Admin
  4. Create/Edit a post/page
  5. Insert a Header block
  6. Set the background video to be the video uploaded in step 2
  7. Save and view the post/page
  8. See that the video doesn't render in the Header

Expected behaviour
The video should render

Actual behaviour
The video doesn't render. The <video> and <source> tags are inserted into the DOM, but the src attribute of the <source> tag is missing.

Link to a page where the bug is reproduced in isolation (optional)
https://isaidotorgstg.wpengine.com/es/latest/news/2024/01/test-header-block-video-spanish/

Screenshots

Platform:
https://www.whatsmybrowser.org/b/9Q2N5

AmnestyAM commented 6 months ago

just adding a note here to follow up with @carolinejcourtney when resolved to see if this resolves the issue reported by LRC.