Remote Video (oEmbed) - Default thumbnails location is invalid

Created on 16 September 2018, over 6 years ago
Updated 12 January 2024, 12 months ago

I'm running Drupal 8.6.1 locally in Acquia Dev Desktop and I'm trying to add Remote Video (oEmbed) assets.

I have left the "Thumbnails location" at the default setting of public://oembed_thumbnails

When I attempt to add my first Remote Video media asset ( https://www.youtube.com/watch?v=anAQ794lsBM ) I get this error message that the thumbnail URI is not valid:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: The URI &#039;public://oembed_thumbnails/6OpXFifNwFUlN09VaoQ-jzI3F_Tac971gZsWRAjnEqM.jpg&#039; is invalid. You must use a valid URI scheme. Use base: for a path, e.g., to a Drupal file that needs the base path. Do not use this for internal paths controlled by Drupal. in <em class="placeholder">Drupal\Core\Utility\UnroutedUrlAssembler-&gt;assemble()</em> (line <em class="placeholder">65</em> of <em class="placeholder">core\lib\Drupal\Core\Utility\UnroutedUrlAssembler.php</em>). <pre class="backtrace">Drupal\Core\Url-&gt;toString() (Line: 180)
Drupal\link\Plugin\Field\FieldFormatter\LinkFormatter-&gt;viewElements(Object, &#039;en&#039;) (Line: 80)
Drupal\Core\Field\FormatterBase-&gt;view(Object, &#039;en&#039;) (Line: 262)
Drupal\Core\Entity\Entity\EntityViewDisplay-&gt;buildMultiple(Array) (Line: 321)
Drupal\Core\Entity\EntityViewBuilder-&gt;buildComponents(Array, Array, Array, &#039;media_library&#039;) (Line: 263)
Drupal\Core\Entity\EntityViewBuilder-&gt;buildMultiple(Array) (Line: 220)
Drupal\Core\Entity\EntityViewBuilder-&gt;build(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 1153)
Drupal\views\Plugin\views\field\FieldPluginBase-&gt;advancedRender(Object) (Line: 235)
template_preprocess_views_view_field(Array, &#039;views_view_field&#039;, Array) (Line: 287)
Drupal\Core\Theme\ThemeManager-&gt;render(&#039;views_view_field&#039;, Array) (Line: 437)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 1743)
Drupal\views\Plugin\views\field\FieldPluginBase-&gt;theme(Object) (Line: 761)
Drupal\views\Plugin\views\style\StylePluginBase-&gt;elementPreRenderRow(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer-&gt;render(Array) (Line: 709)
Drupal\views\Plugin\views\style\StylePluginBase-&gt;renderFields(Array) (Line: 576)
Drupal\views\Plugin\views\style\StylePluginBase-&gt;renderGrouping(Array, Array, 1) (Line: 468)
Drupal\views\Plugin\views\style\StylePluginBase-&gt;render(Array) (Line: 2111)
Drupal\views\Plugin\views\display\DisplayPluginBase-&gt;render() (Line: 131)
Drupal\webprofiler\Views\TraceableViewExecutable-&gt;render() (Line: 183)
Drupal\views\Plugin\views\display\Page-&gt;execute() (Line: 1630)
Drupal\views\ViewExecutable-&gt;executeDisplay(&#039;page&#039;, Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer-&gt;doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer-&gt;render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer-&gt;Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer-&gt;prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer-&gt;renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber-&gt;onViewRenderArray(Object, &#039;kernel.view&#039;, Object) (Line: 76)
Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher-&gt;dispatch(&#039;kernel.view&#039;, Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware-&gt;handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 665)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>

However the folder C:\Users\Nick\Sites\devdesktop\drupal\sites\drupal.dd\files\oembed_thumbnails does get created and an appropriate thumbnail named 6OpXFifNwFUlN09VaoQ-jzI3F_Tac971gZsWRAjnEqM.jpg is placed within it.

I am not sure whether this is a bug or I am using an inappropriate thumbnails location. I tried a few different options but no success. What thumbnails location should I be using in a local Dev Desktop environment?

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
MediaΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΉπŸ‡­Thailand Nick Hope

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.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    This seems like a potentially outdated or 1 off issue given the age and lack of comments.

    I'm going to go with my gut and close as outdated but please feel free to reopen the issue if needed with steps to reproduce from a fresh drupal install

Production build 0.71.5 2024