Hello, previously when I pasted a YouTube URL into the title of a new post, the title of the YouTube video was automatically retrieved, but this no longer works. Do you know why?
cocococosti
(Constanza Abarca)
November 17, 2025, 1:38pm
2
I just tested it and it does work:
What version of Discourse are you running?
I have 3.6.0.beta3-latest, thanks for testing.
I’m also on 3.6.0.beta3-latest locally, and I’m able to retrieve the title without any issues. Are you able to reproduce the same problem in safe mode ?
Yes same issue in safe mode and the title is always “- YouTube”. This happens also on two of my other Discourse sites with very differents settings and TCs installed.
1 Like
cocococosti
(Constanza Abarca)
November 17, 2025, 2:13pm
6
Could it be that you are testing this with private youtube videos?
Moin
November 17, 2025, 2:18pm
8
What Discourse version do you use exactly? There was a change related to getting titles of YouTube videos last week:
committed 04:13AM - 12 Nov 25 UTC
We currently rely on Open Graph data to render YouTube oneboxes.
However, YouTub… e does not always give us a response with the Open Graph
data necessary, leading to empty preview HTML like this that shows
as a broken image in the composer:
```
<img src="" width="480" height="360" title=" - YouTube" style="aspect-ratio: 480 / 360;">
```
In addition, our old method of parsing YouTube script tags for JSON
which contains information for the video, introduced in
https://github.com/discourse/onebox/commit/4d669d2b710483281df1b99ff1140acdada11286,
seems to no longer work reliably, possibly due to changes in YouTube's
JS structure.
To fix this, we switch to using YouTube's oEmbed endpoint which gives us
all the metadata we need for oneboxes in JSON format, including title,
author,
thumbnail URL, and video dimensions. This approach is more robust and
less likely to break
due to changes in YouTube's page structure.
c.f.
https://meta.discourse.org/t/youtube-uris-fail-to-render-thumbnails-when-oneboxed/387673
I use this and the link brings me here: Commits · discourse/discourse · GitHub