Support » Fixing WordPress » Articles containing YouTube links are broken

  • Resolved aw

    (@akirawatase)


    Please see the URL I attached.
    This article contains the following YouTube link
    If I remove the link, the article displays correctly, but if I add the link again, the page collapses.

    Akira

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there!

    I just took a look at that page, and I am seeing your YouTube video embedded. Can you share more about what you mean when the page collapses?

    I did notice that there isn’t much space between the video and the next block of content. Is that what you’re looking to change? If so, one way to add space there is by adjusting your theme’s CSS styles to add additional padding.

    Alternatively, you can add a Spacer Block to add space between the two elements on your post: https://wordpress.org/support/article/spacer-block/

    Thread Starter aw

    (@akirawatase)

    Thank you for your reply @evarlese !

    I checked this page now and it seems fixed I don’t know why. I attached a image file as another example.
    Broken: https://www.camp-house.com/blog/wp-content/uploads/3CAFCA1C-48E2-4846-A2DD-BFA938D34327.jpg
    Current(removed youtube link): https://www.camp-house.com/blog/joined-craft-and-hike-in-tsurugisan-tokushima/
    The page I attached to the first post had same problem till last night. Thanks, Akira

    I see what you mean – thank you for sharing that!

    When you’re adding the YouTube video, are you using the YouTube Embed block?

    Would you mind sharing an example of the URL you’re copying and pasting to your post?

    Since it’s working on another part of your site, that makes me think it’s less likely to be a conflict but that there might be something happening with the embed itself. Thanks Akira!

    Thread Starter aw

    (@akirawatase)

    Erica, thank you for your kind response.

    I have published a new post for this issue. A password is required for viewing. This post is in Japanese. If you need, I will post in English, please let me know.
    https://www.camp-house.com/blog/sample-for-16100013/
    PW: 16100013

    Actually, I write articles by hand, so I don’t use any blocks that include YouTube.
    Currently, articles with youtube links with iframe tags are fine, but I found that text links (e.g. Sample) are broken.
    Thanks, Akira`

    • This reply was modified 1 month, 2 weeks ago by aw.

    Hi Akira,

    I’m sorry for the late reply, and thank you so much for the example post!

    Are you using a plugin for your YouTube embeds at all? From what you’ve said, it sounds like it works when the embed code includes an iFrame, but when you just copy and paste the YouTube URL, it breaks.

    If you’re using the Classic Editor (instead of the block editor), you should still see support for embedding videos by pasting in the URL only. Can you check that the links are on their own line without any additional formatting or HTML?

    Thread Starter aw

    (@akirawatase)

    Hi Erica,

    Sorry for the belated reply, and for the lack of explanation.
    I checked the example post and it seems to display correctly now… It’s good for me but I am not sure why it improved. Anyway, I thought that the problem seems to occur in the following two situations.

    – writing only URLs. eg. https://youtu.be/Bf9lMx1FuIA
    – with a-tag <code><a href="https://youtu.be/Bf9lMx1FuIA">YouTube</a></code>

    I am closing this post but I will keep watching this issue and tell you if it appears again.
    Thank you for your kindness and help!
    Akira

    • This reply was modified 1 month ago by aw.
    • This reply was modified 1 month ago by aw.
    • This reply was modified 1 month ago by aw.
    • This reply was modified 1 month ago by aw.
    • This reply was modified 1 month ago by aw.
    • This reply was modified 1 month ago by aw.

    Thanks Akira, I’m glad it seems to be working for you now!

    Just in case this comes up again – and based on what you shared – I would double-check that you’re adding the URL on its own line. For example, make sure you’re not copying and pasting the URL along with any other text into your post, since this can sometimes add extra HTML.

    For the links/a-tags, those should only display as a link within your text, rather than an embed. So I would give that first option a try if you’re wanting to embed the video into your post. Hopefully it’s smooth sailing from here!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.