silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
20 stars 79 forks source link

remote content (YouTube videos) are uneditable and break the CMS when if a video is removed #1344

Closed NightJar closed 1 year ago

NightJar commented 1 year ago

If one has a page, and that page embeds a YouTube video via the media button in the WYSIWYG, this is good. Until the video expires for whatever reason. In this case if one wishes to edit the embed to insert a new valid video link it results in a broken modal that never loads.

https://github.com/silverstripe/silverstripe-asset-admin/blob/1204ac2a68980e9fb44f05f287d1989ab417d5ec/code/Extensions/RemoteFileModalExtension.php#L99-L120

By design the controller action returns HTTP 500, which is not handled by the client (on the front end). In the least a very confused and frustrated content editor. In the worst, javascript errors and a non-functioning CMS. (unconfirmed, can't remember)

Test case: https://www.youtube.com/watch?v=IvTJ3cRzVbc

image

PRs

sabina-talipova commented 1 year ago

PR merged. Issue was solved. This will be automatically tagged. Close.