We discovered an incompatibility with the CDN module https://drupal.org/project/cdn resulting in an "Unexpected Error" when trying to embed a YouTube video.

With the CDN module, this is due to

file_create_url()

in

sites/all/modules/contrib/media_youtube/includes/MediaInternetYouTubeHandler.inc 
public function getOEmbed()

generating the invalid URL:

/oembed?url=http%3A//<CLOUDFRONTID>.cloudfront.net/http%3A//www.youtube.com/watch%3Fv%3<YOUTUBEVIDEO>&format=json

Instead of the correct URL generated with

drupal_realpath():

http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3<YOUTUBEVIDEO>&format=json

A one line patch is included.

NOTE: https://drupal.org/project/media_vimeo also uses drupal_realpath() in the corresponding place in the code.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewhine’s picture

andrewhine’s picture

Issue summary: View changes