WSOD if wrong url (or network unavailable) with the filter Convert URLs to URLs embed

Created on 21 April 2017, about 7 years ago
Updated 15 April 2024, 2 months ago

Problem/Motivation

If you paste a wrong URL in a body (or the network is down), and the filter Convert URLs to URLs embed is enable, then you've got a WSOD because of the Exception which is thrown.

Embed\Exceptions\InvalidUrlException: The url 'https://twitter.com/drupalsecurity/status/85475996778989000000000' returns the http code 404 in Embed\Embed::create() (line 51 of /srv/www/d8/vendor/embed/embed/src/Embed.php)

Proposed resolution

Wrap with a Try / Catch the \Drupal::service('url_embed')->getEmbed() method.

Remaining tasks

User interface changes

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France flocondetoile Lyon

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France opi

    Why this patch was not included in the 2.0.0-alpha3 release yesterday ? Thanks a lot

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Why this patch was not included in the 2.0.0-alpha3 release yesterday ? Thanks a lot

    Thanks for checking in on this long-running issue. This issue, created 7 years ago, indicates it relates to the 8.x-1.x branch, not the 2.x branch. It also involves a problem with the external library embed/embed version 3, while the 2.x branch used embed/embed version 4.

    In my recent testing, I did not receive an error when trying to use the "Convert URLs to URLs embed" filter.

    If this *is* an issue on the 2.x branch, we will need updated Steps to Reproduce. Otherwise, maybe we should mark this issue as "Closed - outdated"?

  • Status changed to Closed: outdated 2 months ago
  • πŸ‡«πŸ‡·France opi

    You're right, I didn't realise this issue was that old !

    Tested the Twixxx URL in issue summary and can't reproduce on 2.x branch.

    Closed as outdated.

Production build 0.69.0 2024