discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
384 stars 40 forks source link

[BUG] When adding link to a new post, the post title won't auto generate. #116

Open ebmar87 opened 1 week ago

ebmar87 commented 1 week ago

When adding a link via web browser or pwa, the post title won't auto generate the title name.

reallytiredofclowns commented 1 week ago

I am finding links generally populate OK when sharing news articles, but YouTube is not working. Some additional tests I did:

When sharing a link to YouTube videos, the live site has stopped autopopulating the title. In the network console of my browser, it is returning an empty string for the title, {"title":""}. It doesn't work in Firefox or Chrome, on Windows 10.

When I use a dev copy of the site running on localhost, the title autopopulation does work.

For me, title autopopulation on the live site works fine when sharing news articles; it's just YouTube which seems to go off the rails.

ebmar87 commented 1 week ago

It happens with news sites for me also.

On pwa: I use the copy button, and paste button that are built into to Android- nothing happens. Remove the link and paste with holding and then paste - works sometimes

previnder commented 1 week ago

Youtube links are not auto-populating on the production server, indeed, but can confirm over here too that it's working fine on localhost.

Requests to Youtube (for the https://www.youtube.com/watch?v=xxxxx addresses) on the production server returns an HTML file that has no Open Graph tags. Tried changing the user-agent of the outgoing requests from the prod server to Youtube, but the result is the same.

Interestingly, the submit form at Reddit (new Reddit) is also unable to capture titles for Youtube links.