Hey folks! Hope everyone reading this is having an amazing day.
TLDR: Embeds work in the Gutenberg editor but not on the frontend. Fallback Blockquote is being shown on fresh Sage 10 project (latest Sage version), instead of the actual iFrame.
So, I’ve been trying to create Embed templates for one of my projects using Sage 10 & Bedrock and I’ve encountered a weird issue where the embed iFrames are being hidden and instead the fallback Blockquote element is being shown. The interesting thing is that the iFrames actually WORK in the Gutenberg editor as intended. To make my life easier and instead of disabling all of the plugins on my projects one-by-one, I’ve decided to create an empty Sage 10 project and test out the Embed functionality there.
I’ve basically created the embed-post.blade.php in my Views subfolder and embed.php in my theme’s root folder. Now, I copied a Post’s link and pasted it in a random new dummy Page to create the embed. As you can see on the Screenshot bellow, the iFrame is hidden by default and if I remove the ‘position: absolute’, the template I’ve created will appear.
I am using the latest Sage version on both the real project I am working and the dummy project I’ve created, and the embeds don’t work on any of those. The interesting thing is that I am using Sage (older version: 10.0.0-dev) on a totally different project, and the embeds work there without any issues.
How to recreate the issue:
- Install Wordpress locally
- Install Sage 10 (latest version) and build it.
- Create embed-post.blade.php in the views subfolder.
- Create embed.php (embed.php - Pastebin.com) in the theme’s root folder.
- Copy any articles link and try to embed in in other article or page.
- Embed will work in the Gutenberg editor, but the fallback Blockquote element will be shown on the front end. The actual iFrame will be hidden.