Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • yDNA 3 posts 73 karma points
    Feb 25, 2020 @ 08:06
    yDNA
    0

    Embed YouTube video does not work

    Hello.

    I'm having a strange behaviour in Umbraco 8 while embedding a YouTube link into a content page.

    Basically the link is resolved and the preview showed within the backoffice contents area but, navigating the final page results in a json-like text with video metadata (constraint, height, width) values and a preview value showing "Page not found" error (I guess because of resulting double quotes escapes).

    Here is the html snippet generated by umbraco for the YouTube video:

    { "constrain": true, "height": 240, "width": 360, "url": "https://youtu.be/FHlnqiEQig0", "info": "", "preview": "" }

    Please, any advice would be appreciated. Thanks in advance.

    Andrea

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Feb 25, 2020 @ 11:26
    Dave Woestenborghs
    0

    Hi Andrea,

    How are you embbeding the video ? Through a rich text editor or through a custom property editor.

    Dave

  • yDNA 3 posts 73 karma points
    Feb 26, 2020 @ 10:41
    yDNA
    0

    Hi Dave, thanks for replying.

    I'm trying to embed my video through the grid Embed editor that I inherited from the default Umbraco 8 starter kit.

    I've arranged to modify the template of this editor from:

    @Html.Raw(Model.value)

    to

    @Html.Raw(Model.value.preview)

    and this is actually fixing my problem since the "preview" field in the model passed contains the correct iframe tag showing the YouTube video.

    I'm not aware why this thing changed though: the original Embed.cshtml template of this editor just worked fine without any correction until now.

    Thanks and regards, Andrea

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies