Skip to content

YouTube embeds using /watch URLs broken on V3.2.1 #180

@steven-honcho

Description

@steven-honcho

After upgrading from 3.1.6 -> 3.2.1, any YouTube embeds we had seemed to be broken - but unusually only on 'live' environments, local DDEV seemed fine.

Locally, on 3.2.1, the TWIG .render method would output the following:
<iframe width=&quot;200&quot; height=&quot;113&quot; src=&quot;https://www.youtube.com/embed/_HWRGKfSq3A?enablejsapi=1&amp;feature=oembed&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&quot; referrerpolicy=&quot;strict-origin-when-cross-origin&quot; allowfullscreen=&quot;&quot; title=&quot;Jose Gonzalez - Stay Alive | The Secret Life of Walter Mitty&quot;></iframe>

Whereas on our staging environment, with the same video URL, it'd output the following:
<iframe src=&quot;https://www.youtube.com/watch?enablejsapi=1&amp;v=_HWRGKfSq3A&quot;></iframe>

Both were using the exact same URL:
https://www.youtube.com/watch?v=_HWRGKfSq3A

Aside from the frontend being broken, the video preview under fields using URLs in this format also seemed broken (loading the entire YouTube page rather than just the video).

Downgrading to 3.1.6 seems to fix the issue, both frontend and in the CMS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions