Youtube links/embeds all disappeared

I don’t run a Discourse forum, but I participate in one, where the admins can be hard to reach.

Us users recently noticed that all Youtube links/embeds from 2019 or earlier disappeared from all posts. There was no announcement related to it, so we hope it was accidental.

Is that something that the admins would have had to do on purpose? Is there a setting they could have changed that would result in that happening?

1 Like

Hiya! :wave:

Do you mean the content was edited and the links removed? Or are the links there, but are not showing an embedded video player? :thinking:

Thanks for replying!

When posts contained links to YouTube, they became embedded videos. Now those posts show neither a link nor an embed, the video is just missing from the post. Here’s an example. This is a post from 2019 that used to have a video in it. The user did not edit the post, but the video is gone.

Inspecting the HTML, the video links must still be in the original post source, but whatever renders them as an embedded video doesn’t seem to be working?

Well that’s not good. Sounds like you and your fellow users are more vigilant than they are.

Consider setting up your own! You will get plenty of support from here.

If you do get in touch with an admin, ask them to “rebake” a few problem Posts with youtube videos and see if that fixes it. It takes a moment. There’s also a rake task they can run that can target sets of posts.

1 Like

Nothing comes to mind. In this case it might be best to raise the issue in the community.

Good luck! :slight_smile:

Some additional info:

  • It appears to be a paid Discourse instance, not a self-hosted one
  • The admins don’t know what to do, “I can’t do anything on the admin side to fix this”

If they are hosted by us, you can have them write to us:

As a customer, we will be able to discuss what their options are, as well as access to more information about potential causes. :slight_smile:

Either way, if they’re paying someone they should probably reach out to them!

You haven’t named the community here, so it’s hard to check where the instance is located.

I have exactly the same problem: a topic with 1500+ posts many of those with youtube video links. And ones at the start of the topic do not render any embed, while those which are recent do render embeds.

All youtube links which do not render are actually valid and if you open them in the separate tab, they play on youtube perfectly. Or if you create a new post with the same link, it will render an embed.

Seems like a bug in Discourse?
Version: 3.1.2

Could you try rebuilding the older posts? That should fix them.

How could I do that?

I have tried editing them, this didn’t help.

It should be under the menu, then under the wrench.

Though editing the posts should have had the same effect…

1 Like

You can also do them in bulk:

rake posts:rebake … which scales as it drip-feeds a rebuild.

1 Like

will try! not much of a rails/rake user right here, but I’ll google about this :slight_smile:

Editing somehow restores preview, but it’s static without youtube’s play icon or any interactivity – simply an image.

It’s something you really need to know about if you are going to manage your own self-hosted install for very long.

You basically enter the container and run a rake task like so:

cd /var/discourse
./launcher enter app
rake posts:rebake
1 Like

Well, I know linux/bash/etc pretty well, and managed to manage a discourse instance for at least 5 years without running a single rake command. Updating using launcher was enough for now.

But if it’s just posts:rebake it’s not that hard I guess.


there always comes a time when something like this happens and you have to dig a little deeper. :slight_smile: