Closed (fixed)
Project:
Media: YouTube
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2012 at 16:46 UTC
Updated:
11 Aug 2017 at 14:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andersiversen commentedI have this error as well - any news of a fix on it's way to head/dev versions?
Comment #2
RobW commentedI haven't run into this error. Can you give steps to reproduce on a fresh (non-distribution) Drupal install?
Comment #3
rliI have this error too.
When I go to my video content type -> manage display for my video field, and change the format to 'Media style: original', I started to get this error.
I tried to var_dump the $parts out in line 17, then I realized:
for the first time I visit my video content node after I save the setting, I can see the $parts is an array like this 'array(1) { ["v"]=> string(11) "xxxxxxxxxxxx" } ', whereas when I reload the page, this error will happen and the $variables['uri'] will become null, which I guess is causing the error?
I think even I add a condition to check if $wrapper is an object, I still can not see the players appearing in the node as there is only one element in $parts array?
Hope this can help.
Comment #4
junni commentedI came across this bug, created a patch for it based on a media_vimeo patch.
Comment #5
daniel_j commentedThe attached patch applies cleanly to 7.x-3.0, and resolves the issue somewhat more elegantly as it does not generate any PHP warnings concerning undefined variables or indexes.
Comment #6
daniel_j commentedComment #7
joseph.olstadHere's a patch rerolled for head of 7.x-3.x
Comment #8
joseph.olstadneeds review
Comment #9
steinmb commentedThe patch make sense though. How can I re-produce the bug?
Update: one way would be to run:
Comment #10
steinmb commentedWith the patch applied did it run further though:
Comment #11
joseph.olstadlooks like the patch is good.
As for the test, can you debug getLocalThumbnailPath() ?
figure out why getLocalThumbnailPath() isn't happy.
comparing this:
to this from exception code:
I'm not sure if either of these is valid: '://media-youtube ' or 'public://media-icons'
I think if this test call to getLocalThumbnailPath() is solved
then we can resolve this critical issue:
#2883644: Fix head tests for media_youtube 7.x-3.1
It could be that the above patch will help us solve
#2883644: Fix head tests for media_youtube 7.x-3.1
Comment #13
joseph.olstadpatch 8 committed as-is.