Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Reusable Block Embed Not Working #42056

Open rossanafmenezes opened 4 years ago

rossanafmenezes commented 4 years ago

Steps to reproduce

  1. Create a new page or post
  2. Add an embed block that was added as a reusable block (in this specific case a PDF file from the Media LIbrary was added)
  3. Publish the page or hit the Preview button

What I expected

I would expect the PDF file to be embedded and show the file just like when I use the Embed block that is not a reusable block like this:

What happened instead

The block shows only the link to the file. You can compare both on the Screenshot below. The block above it is a regular embed block and the PDF file shows as it should. Below that there's the exact same block only it was used as a reusable block and only a link shows:

Context / Source

This issue was brought by a user on HC - 21004768

They are using a retired theme (Heart&Style) so at first I thought that was the issue but I tried on my test blog using several different themes including the new ones like 2020, Barnsbury, etc and the issue is replicated on every theme I tried.

Link to my test blog https://1234hetrialtest.wordpress.com/reusable-blocks-test/

user-report

vinnykaur commented 4 years ago

Came across another one with Youtube embeds not working as reusable blocks. zd-3450169

formosattic commented 3 years ago

Same issue reported on https://github.com/WordPress/gutenberg/issues/14608

In the case of YouTube, using the shortcode worked, but must be in a Paragraph block, the Shortcode block won't work:

[youtube https://www.youtube.com/watch?v=BK4ftD33FUI]

+1 3675264-zd-woothemes

sbathompson-he commented 3 years ago

Same issue with a user today.

This did work though: In the case of YouTube, using the shortcode worked, but must be in a Paragraph block, the Shortcode block won't work: [youtube https://www.youtube.com/watch?v=BK4ftD33FUI]

27349711-HC

katiebethbrown commented 3 years ago

Another report here: 27701717-hc

Youtube embed inside reusable block displays as a blank space with the youtube link below:

dJwPTp

Changing the reusable block to regular blocks resolves as does placing the embed outside the reusable block content. I also shared the shortcode as a workaround.

lakellie commented 3 years ago

This is a Gutenberg issue: https://github.com/WordPress/gutenberg/issues/14608

Robertght commented 3 years ago

Another case in #30010011-hc

ChrissiePollock commented 3 years ago

Another report on 31684050-hc We used shortcode in the paragraph block to fix.

dpasque commented 3 years ago

Closing in favor of the Gutenberg issue, which can be found here: WordPress/gutenberg#14608

formosattic commented 3 years ago

+1 27149499-hc

dpasque commented 3 years ago

Reopening so it can be tracked for easily from the A8c side.

sajmes commented 3 years ago

YouTube embed did not show when added in a reusable block. It does then show if converted to regular blocks.

Aquene.

Report: 4448310-zd-woothemes

jorpdesigns commented 2 years ago

Another Youtube embed not working when added in a reusable block.

Used shortcode workaround.

zd-4581424