TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.22k stars 10.1k forks source link

Bookmark for YouTube links not working #20445

Closed betschki closed 1 week ago

betschki commented 1 week ago

Issue Summary

Adding a bookmark card with a link to YouTube seems to have broken in v5.86.0.

Previously, adding a bookmark card with a valid link to a YouTube video resulted in this: CleanShot 2024-06-23 at 14 59 44@2x

Response from XXX in v5.85.2:

{
    "version": "1.0",
    "type": "bookmark",
    "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
    "metadata": {
        "url": "https://www.youtube.com/watch?v=aqz-KE-bpKQ",
        "title": "Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film",
        "description": "Enjoy this UHD High Frame rate version of one of the iconic short films produced by Blender Institute!Learn more about the project here http://bbb3d.renderfa…",
        "author": null,
        "publisher": "YouTube",
        "thumbnail": "https://i.ytimg.com/vi/aqz-KE-bpKQ/maxresdefault.jpg",
        "icon": "https://www.youtube.com/s/desktop/9f65bf98/img/favicon_144x144.png"
    }
}

From v5.86.0 onwards (tested in v5.86.1 as well), the same link in a bookmark card produces an error: CleanShot 2024-06-23 at 15 00 22@2x

Response from XXX in v5.86.0 and v5.86.1:

{
    "errors": [
        {
            "message": "Validation error, cannot read oembed.",
            "context": "URL contains insufficient metadata. https://www.youtube.com/watch?v=aqz-KE-bpKQ",
            "type": "ValidationError",
            "details": null,
            "property": null,
            "help": null,
            "code": null,
            "id": "8c6cb290-3160-11ef-bc69-01c02bf2f945",
            "ghostErrorCode": null
        }
    ]
}

Steps to Reproduce

  1. Create a new post in v5.86.0 or v5.86.1
  2. Add a bookmark card
  3. Enter any YouTube URL (for example https://www.youtube.com/watch?v=aqz-KE-bpKQ)
  4. Error is shown

Ghost Version

v5.86.0

Node.js Version

18 LTS

How did you install Ghost?

Ubuntu 22.04 with Ghost CLI

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output

No response

Code of Conduct

kevinansfield commented 1 week ago

Closed via https://github.com/TryGhost/Ghost/pull/20446. Released in 5.86.2.

Thanks for the quick report!

betschki commented 1 week ago

Thanks for the quick fix!