Skip to content

Embed blocks no longer appear when content position is set on cover block #28640

Closed

Description

@lakellie

Description

When an embed block is inserted inside a cover block, the embed block does not appear when a non-default content position is selected for the cover block.

Step-by-step reproduction instructions

  1. Add a cover block
  2. Add an image background
  3. Add an embed block inside the cover block (I tested with both YouTube and SoundCloud)
  4. Set the content position on the cover block to something besides the default center position, like "top center" or "bottom center"
  5. Save and view the post on the frontend.

Expected behaviour

The embed to appear inside the block

Actual behaviour

When you view the post/page, the embed does not appear

Screenshots or screen recording (optional)

https://d.pr/i/C6sSE3

WordPress information

  • WordPress version: 5.6
  • Gutenberg version: Gutenberg 9.8.3
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes, issue occurs on all themes

Device information

  • Device: Desktop
  • Operating system: MacOS Catalina
  • Browser: Chrome 88

Activity

  1. added
    [Block] Cover
    [Type] Bug
    [Type] Regression
    on Feb 2, 2021
  2. sirreal commented on Feb 2, 2021

    @sirreal
    Member

    Thanks for the report. I've just confirmed this is an issue with Gutenberg 9.8. You can see an example here from the frontend. Notice that the iframe containing the video is present in the HTML, but has 0px x 0px size:

    Screen Shot 2021-02-02 at 10 03 08

    By quickly tweaking some rules in the browser we can give the iframe some size and it appears (just a demo, this is not a fix):

    Screen Shot 2021-02-02 at 10 03 29

    I suspect this is a regression introduced by #25171. It looks like the new markup introduced there is not compatible with responsively sized embeds.

    FYI @ajlende @mkaz

  3. added this to the Gutenberg 9.8 milestone on Feb 2, 2021
  4. sirreal commented on Feb 2, 2021

    @sirreal
    Member

    This is a problem with the latest Gutenberg build from the main branch as well.

  5. added
    CSS Styling
    on Feb 2, 2021
  6. added
    [Status] In Progress
    on Feb 2, 2021
  7. brentswisher commented on Feb 3, 2021

    @brentswisher
    Contributor

    Just noting that #28653 has merged and appears to have fixed this - I know @jasmussen has some questions in that PR (Is it the right default size etc) so I will leave it up to him to close this or not, but it is working for me in the latest master. At least wanted to get this linked to that PR

  8. jasmussen commented on Feb 4, 2021

    @jasmussen
    Contributor

    Yep, this one is can definitely be closed, as the problem has been addressed.

    There's a conversation to be had from the PR you link, on whether the arbitrary dimensions applied to prevent the embed from collapsing can be improved. But at least now it's functional to the point that it's clear what's going on when you use the embed with the matrix alignment tool and you see the result. If that result is not good, you can un-align.

    Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CSS Styling[Block] Cover[Status] In Progress[Type] Bug[Type] Regression

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions