Skip to content
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

Gutenberg: Embeds: Facebook embed doesn't show preview #27701

Closed
alisterscott opened this issue Oct 10, 2018 · 28 comments
Closed

Gutenberg: Embeds: Facebook embed doesn't show preview #27701

alisterscott opened this issue Oct 10, 2018 · 28 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Goal] Gutenberg Working towards full integration with Gutenberg [Pri] Normal [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Enhancement User Report This issue was created following a WordPress customer report

Comments

@alisterscott
Copy link
Contributor

alisterscott commented Oct 10, 2018

Steps to reproduce

  1. Starting at URL: https://wpcalypso.wordpress.com/gutenberg/
  2. Paste a Facebook post link such as https://www.facebook.com/hollybutcher90/posts/10213711745460694

Gutenberg in Calypso Result

screen shot 2018-10-10 at 11 22 50 am

Calypso Editor Result

screen shot 2018-10-10 at 11 24 51 am

Browser / OS version

Chrome 69 on macOS

Related

#27498

@alisterscott alisterscott added [Pri] Normal [Type] Task [Goal] Gutenberg Working towards full integration with Gutenberg labels Oct 10, 2018
@alisterscott alisterscott changed the title Gutenberg: Embeds: Facebook embed doesn't work Gutenberg: Embeds: Facebook embed doesn't show preview Oct 10, 2018
@gwwar gwwar added this to the Gutenberg Embeds milestone Jan 8, 2019
@JavonDavis
Copy link
Contributor

JavonDavis commented Jan 11, 2019

Currently still behaves this way in wordpress.com in the editor. Is the intended behavior? If so we can close out this one.

@codebykat
Copy link
Member

This is a Gutenberg core issue that is being tracked here: WordPress/gutenberg#8360

Since the embed itself renders after publishing, I don't think there's anything we can or need to do here.

@gwwar gwwar reopened this Apr 12, 2019
@gwwar
Copy link
Contributor

gwwar commented Apr 12, 2019

Reopening to keep track of reports. If needed we can fix this ahead of core.

@jjchrisdiehl
Copy link
Contributor

Another case here 9724873-hc

Customer tried embedding their facebook page and received Sorry, we cannot preview this embedded content in the editor.

@zdenys
Copy link
Contributor

zdenys commented Jun 6, 2019

Another case 2089010-zen

Tested with a different Facebook Page. Embedding a page URL, like https://www.facebook.com/AutomatticInc/ doesn't work and shows Sorry, this content could not be embedded.:

Embedding an individual post, like https://www.facebook.com/AutomatticInc/posts/998273493676267 works

Is it expected behavior? It seems it is.

@taropaa
Copy link

taropaa commented Aug 13, 2019

I am running into the same issue. Embedding a generic facebook page will just display a text URL that is not even clickable.
To make things worse, I can't paste a facebook page URL without it being converted into a broken embed. If default profiles can't be embedded, then just leave the URLs alone. In this particular instance, it works completely against the user and will drive a less experienced user insane, who just wants to paste a facebook link.

@formosattic
Copy link

+1 15689980-hc

The "Embedded content from facebook.com can't be previewed in the editor."
message is viewed as an error which makes it sound like the embed is broken even though it'll still display on the site.

@gwwar
Copy link
Contributor

gwwar commented Oct 29, 2019

This should be on the WP whitelist, though WordPress/gutenberg#8360 is still open.

I'm still seeing the following on a standalone install. We'll need to make a core PR

Vanilla Install
Screen Shot 2019-10-28 at 5 17 53 PM

wpcom
Screen Shot 2019-10-28 at 5 20 11 PM

@gwwar gwwar added the [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. label Oct 29, 2019
@davipontesblog
Copy link
Contributor

@lancewillett do you think this is something we could prioritize in dotCom vs core, or help with efforts in core to fix the issue? Context: this used to be possible in the classic editor.

@lancewillett
Copy link
Contributor

@davipontesblog Let's help push the fix "upstream" meaning in core first.

(CC @mtias as an example where WP.com can help make a core change, then merge it back to our platform later.)

@ockham
Copy link
Contributor

ockham commented Sep 16, 2020

Ran into this today on WP.com. Couldn't repro in Core however -- it seems to work there now 🤔

WP.com (with GB 8.9.3):

image

Local vanilla GB install (master, >= 9.0):

image

The difference seems to lie in the previewable attribute, which isn't set in vanilla GB, but on WP.com is set to false.

@ockham
Copy link
Contributor

ockham commented Sep 16, 2020

Hmm, maybe that's expected/consistent. The FB embed hard-wires the previewable attribute to false here: https://github.com/WordPress/gutenberg/blob/f3cdac3726638604ecb9bef639db13a755acaf1b/packages/block-library/src/embed/variations.js#L70

But in 9.0, the FB embed was "removed": WordPress/gutenberg#24472

This means that inserting an FB URL will now create a "generic" embed -- which doesn't have previewable set, thus displaying the preview.

cc/ @ntsekouras @mkaz (in case we'd like to change that -- not sure what the original motivation for setting previewable to false was)

@ntsekouras
Copy link
Member

not sure what the original motivation for setting previewable to false was)

When I refactored embed to use block variations that setting (previewable: false) was there before. I don't have the context for that decision..

@mkaz
Copy link
Contributor

mkaz commented Sep 16, 2020

@ntsekouras I'm not sure about the setting either.

@ntsekouras
Copy link
Member

#27701 (comment)

-cc @youknowriad @mcsf @ellatrix @jorgefilipecosta
Do you have any context for the motivation for setting previewable to false for FB embed? Thanks!

@mcsf
Copy link
Member

mcsf commented Sep 17, 2020

Do you have any context for the motivation for setting previewable to false for FB embed? Thanks!

I have no knowledge about this. Some of the people who did the most work on Embeds haven't been around in a while, either.

@ockham
Copy link
Contributor

ockham commented Sep 18, 2020

Could it be a privacy/GDPR thing? Do oEmbeds do any sort of non-GDPR compliant tracking? (Would be kinda surprising tho...)

@ockham
Copy link
Contributor

ockham commented Sep 18, 2020

Tracked it down to this PR, which seems to be where the FB embed block was first introduced (and added to a noPreview array, which seems to be the predecessor of the previewable attribute): WordPress/gutenberg#816 (comment):

Also, previewing facebook embeds is disabled, because fb scripts want to change global things about the document they're running in (which the sandboxing iframe highlighted and wouldn't allow).

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@worldomonation
Copy link
Contributor

Removing the Stale label as Facebook (among other media embeds) continue to provide less than ideal experience.

When embedding a link, the block turns to a simple paragraph of the embedded URL. The blocks do not render as expected in Preview nor in Published mode.

@kristenzuck kristenzuck added the User Report This issue was created following a WordPress customer report label Apr 29, 2021
@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@worldomonation
Copy link
Contributor

Removing Stale label.

However, upstream issue WordPress/gutenberg#8360 is now closed with comment:

> This can be closed since facebook is no longer supported in the embed block because of their api changes. [87c4dc5](https://github.com/WordPress/gutenberg/commit/87c4dc536f52254975b4b5e192e36f7d98b6f0b7)

Given this development, either we develop our own fixes for this block, or remove the Facebook embed block entirely.

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@danielbachhuber
Copy link
Contributor

Given this development, either we develop our own fixes for this block, or remove the Facebook embed block entirely.

@vindl Given the above ^, did you have an opinion on how we'd resolve this issue?

@vindl
Copy link
Member

vindl commented Jul 12, 2022

@vindl Given the above ^, did you have an opinion on how we'd resolve this issue?

It would probably make more sense to develop our own fixes or version of this block. However, this falls into new feature development territory a bit, so I'll assign it back to the team that's owning the Blocks work. They might be in a better position to make this call.

@github-actions
Copy link

github-actions bot commented Jan 8, 2023

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

@jeherve
Copy link
Member

jeherve commented Feb 21, 2024

Closing this in favor of Automattic/jetpack#35826 since the Facebook embed block is now part of Jetpack.

Copy link

Support References

This comment is automatically generated. Please do not edit it.

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Goal] Gutenberg Working towards full integration with Gutenberg [Pri] Normal [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Enhancement User Report This issue was created following a WordPress customer report
Projects
Development

No branches or pull requests