-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress embed block working differently in the editor for different domains #158
Comments
In further checking, embed requests from sub domains of a WordPress Multi Site network do work in a local installation. |
Explanation for the local embeds failingMy guess for local subdirectory installs is that the http requests are failing due to There is a filter that we can hook into in order to set
I already have code in oik that implements a solution for local URLs
Perhaps it can be used for the And also take into account the latest functionality in WordPress 5.5 to check the environment type. |
Similar problems have been reported as Gutenberg issues. See WordPress/gutenberg#21029 (comment) |
I'm now going to transfer this issue to the oik base plugin since it's in that plugin that I've implemented the workaround to set |
This screen capture shows the embedded content from The iframe was there, but a style on the iframe was I also needed to uncheck the The problem occurs in WordPress 5.5 and Gutenberg 8.8.0 |
Discovered that unchecking the |
Explanation for the hidden iframeIt transpires that WP_oEmbed_Controller::get_proxy_item() is returning the HTML that contains the style that hides the iframe.
This is because of some logic in
There's probably a good reason for this but it eludes me. This logic isn't run when the embed is performed locally as the data is returned earlier
|
ConclusionTo enable content from other local sites to be embedded I can use the filter function. See #158 (comment) To enable content from remote sites to be displayed in the editor I could disable the processing in
This nearly works but the second and subsequent embeds still show the blockquote link. Only the first has been hidden with |
The correct conclusion for this part of the problem - only displaying the link - has now been implemented in Gutenberg. See the above issue. I can therefore close this issue when I’ve checked it out the fix for both parts of the problem. |
I'm raising this against oik-css initially for no other reason than the fact that I've already changed it for bobbingwide/oik-css#11.
While working on bobbingwide/oik-css#11, I noticed a number of other anomalies with WordPress embeds.
I also had problems when trying to embed content from
s.b/wordpress
intos.b/cwiccer
; both local sites.Side note
If you take the URL for the fetch that failed with a 404 and paste it into the browser then you get
But this is a red herring.
That's the expected response when the request is sent from the browser.
This is similar to the problem reported in Gutenberg issue number 22104, which has been closed as Unable to Reproduce.
Investigation required
There are two problems to investigate:
The text was updated successfully, but these errors were encountered: