For media_youtube/vimeo I get this error when I use drush to install a profile that contains demo media content.
This seems to be a hiccup where something is not ready during the install but is only a temporary problem. I think it can be fixed by just wrapping the $wrapper->get_parameters() in an is_object($wrapper) conditional statement. This fixed the issue for me on OpenChurch.
http://drupal.org/node/1585348#comment-6156296
I can patch it for OpenChurch but I think it would be wise to add an is_object() condition or something similar to have a safe fallback if the wrapper object isn't populated.
Comment | File | Size | Author |
---|---|---|---|
#7 | media_youtube-fix-for-get-parameters-1658006-8.patch | 1.53 KB | joseph.olstad |
Comments
Comment #1
andersiversen CreditAttribution: andersiversen commentedI have this error as well - any news of a fix on it's way to head/dev versions?
Comment #2
RobW CreditAttribution: 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 CreditAttribution: Junni at Calibrate commentedI came across this bug, created a patch for it based on a media_vimeo patch.
Comment #5
daniel_j CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: steinmb as a volunteer commentedThe patch make sense though. How can I re-produce the bug?
Update: one way would be to run:
Comment #10
steinmb CreditAttribution: steinmb as a volunteer 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.