I am having no luck getting the D7 versions of Media/Styles/Media_YouTube, etc. to work. It just refuses to display the YouTube video on the page.

Currently, after installing the latest dev version, I am getting this on the node page with a YouTube video attached:

Fatal error: Call to a member function getLocalThumbnailPath() on a non-object in /Volumes/Files/robert/Sites/nia_dev/sites/all/modules/contrib/media_youtube/includes/MediaYouTubeStyles.inc on line 32

Any suggestions?

Comments

shane birley’s picture

I just did a full uninstall and installed the dev. The thumbnails started working better but I am getting this error:

Fatal error: Call to a member function get_parameters() on a non-object in media_youtube.theme.inc on line 16

I receive this error when attempting to edit any view that is displaying a content type with media fields.

shane birley’s picture

Debugging revealed that the uri is not populating. So, there is something preventing those variables not getting to this point.

There appears to be a question also about the module not recognizing video content vs. other types but I am still tinkering... just trying to find the time. Will post when I know for certain.

jisuo’s picture

Have you found anything about this? I'm making my own Stream Wrapper and encountered this error.

EDIT: I got rid of the error by checking if we are in correct scheme:

function MYMODULE_file_formatter_image_view($file, $display, $langcode) { 
  $scheme = file_uri_scheme($file->uri);
  if ($scheme == 'MYSCHEME') {
    $wrapper = file_stream_wrapper_get_instance_by_uri($file->uri);
    $wrapper->getExternalUrl();
    //Do more stuff
  }
}

Now I just got to make it render correctly.

tregeagle’s picture

Hi,
I just had the same error and it turned out that my sites/default/files directory had the wrong permissions. Check your:
admin/config/media/file-system

AFFLemos’s picture

Hi Shane,

i'm getting the same error, did you manage to solve it?

AFFLemos’s picture

I've solved the error by uninstall the styles module and that's it.

Cheers,

parkvincent’s picture

Problem solved - I just disabled the STYLES module. The error's gone. Thanks afflemos.

AFFLemos’s picture

Bloody hell, it happened again but i don't have the styles module installed lol.

Someone?

RobW’s picture

Status: Active » Closed (won't fix)

It's no longer recommended to use styles with Media modules. In fact, all Styles supporting code has been removed in Media: YouTube 2.x recently. Pretty much everything it did you can do easier with File Entity and manage file display (see the docs linked in #1699066: Revise documentation for Media 2.0; remove deprecated information, include overview and walkthrough examples).

#6 is really the best approach. Good luck everybody.