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

SmartFrame block: works on WordPress.com (simple sites) but not self-hosted #34562

Open formosattic opened 11 months ago

formosattic commented 11 months ago

Impacted plugin

Jetpack

Quick summary

The SmartFrame embed block works on WordPress.com for simple sites but not with atomic sites or Jetpack on self-hosted.

Steps to reproduce

  1. Create a test site on either self-hosted or atomic site on WordPress.com
  2. Add a SmartFrame block, and embed https://support.smartframe.io/p/imgp7068_3_copy_1676383547359/628c192e4f448e34f5c451a37dd16ab3 (example from https://smartframe.io/)

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

Embedded image showing in the editor and live preview.

What actually happened

Embed doesn't display on the live preview.

Here are more detailed notes from different hosting:

Jurassic Ninja

Error message: Sorry, this content could not be embedded. image

Atomic site

Embed doesn't display in the editor, but displays on the live site.

Jetpack on self-hosted

Embed displays neither in the editor or live site.


For Atomic and Jetpack on self-hosted, the editor show this error: image-1

Impact

Most (> 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

SmartFrame guide to embed on WordPress, it recommends using an HTML block to add the script to embed. https://smartframe.io/support/embed-smartframe-on-wordpress/

SmartFrame block was previously fixed in https://github.com/Automattic/jetpack/issues/21062.

Context: ran into this while updating some docs and testing the Jetpack blocks.

jeherve commented 11 months ago

Interestingly, it seems to work at times, but the connection randomly fails, sometimes with this CORS error:

The Same Origin Policy disallows reading the remote resource at https://static.smartframe.io/themes/null/default.json. (Reason: CORS request did not succeed). Status code: (null).

@Automattic/apex Did you happen to have contacts at SmartFrame back when you worked on this embed implementation? It may be interesting to have someone on their team take a look at this, to ensure that oEmbeds still work well on their platform.

Thank you!

github-actions[bot] commented 5 months 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.

ivan-ottinger commented 3 months ago

Hey Jeremy 👋🏼 Thank you for the ping. This one must have fallen through cracks. Sorry about that. 😬

Did you happen to have contacts at SmartFrame back when you worked on this embed implementation?

AFAIK, we don't have any contacts at SmartFrame.


Just noting that the issue is still reproducible by following the steps in the issue description.

I have added the task to the Build maintenance board so it can be investigated further, however, I am afraid that in Apex we won't have enough bandwidth to look into this issue in the near future.

cc @andregardi