- Issue created by @AndersTwo
This particular exception happens when a YouTube video is no longer available or private, which is a very common situation.
The crash can be temporarily fixed in
ConvertUrlToEmbedFilter.php
as shown in the snippet below, although it's really only a first attempt at getting past the road block. Please excuse the misplaced use of a Bootstrap alert here. You certainly know a better way to inject a message to make end users aware of a problem with one of the URLs in the text.public function process($text, $langcode) { try { $result = new FilterProcessResult(static::convertUrls($text, $this->settings['url_prefix'])); } catch (NetworkException $e) { $result = new FilterProcessResult('<p class="alert alert-danger">A network exception occurred with embedding an URL</p> ' . $text); } return $result; }