Anyone else having issues with broken thumbnails that are uploaded via Media Browser? For example I am uploading a staff member picture and the thumbs are broken everywhere.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drupalninja99’s picture

I think that is maybe a GD library issue or something. I had a lot of problems with a D7 site I did when I was testing it on webenabled.com and I think after many hours I figured out that it was do to the image api. That is something you should check. So in that instance on my local box or on my ubuntu linode the thumbs came up fine. Check your image api and see if there are any errors or anything.

drupalninja99’s picture

I guess you don't get the same issue if you just upload thumbnails the normal way?

Is the media browser a D7 core deal or part of the media module? I know I have the media module installed by default in anticipation of adding a video feature soon.

pearcec’s picture

I did check the status. Everything seems fine. We have imagemagick and php5-gd installed. If I save the Image Style again it DOES rebuild the thumb. But now I overrode what the feature provides. Also new images are still broken.

drupalninja99’s picture

what if you just flush the caches? did you confirm is the media browser a core thing or does that come from the media module?

pearcec’s picture

Clearing Cache also generates the thumbs. That must be what I happened before. As far as what is media browser? I guess that is part of core.

drupalninja99’s picture

Status: Active » Fixed

Going to change to fixed unless this is a recurring issue.

pearcec’s picture

Status: Fixed » Needs work

Well clearing the cache generates the thumbs. But new uploads are still a problem. So I would say for now we have a workaround. But no solution.

drupalninja99’s picture

ok I am going to have to test and see if I can reproduce on other environments.

pearcec’s picture

Yea for now let's leave it open to see if anyone else has the issue.

drupalninja99’s picture

Resurrecting bc I am getting this on my aegir server: http://demo-oc.v4643649448.v180p.nyc.host8.biz/multimedia/video

I think its either an image api or some kind of curl type project or something

drupalninja99’s picture

Going to try every version of media module to see if any of them fix the issue

drupalninja99’s picture

Tried every version of media module. This might hold up the release of the video feature.

drupalninja99’s picture

This seems to be a related issue: http://drupal.org/node/717704

drupalninja99’s picture

ok its definitely a remote fopen problem. alot of hosts disable this for security reasons. I wish these stream-based modules would use curl instead of the copy() function, like this code would work.

    $ch = curl_init ($source);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
    $rawdata=curl_exec($ch);
    curl_close ($ch);
    if(file_exists($destination)){
        unlink($destination);
    }
    $fp = fopen($destination,'x');
    fwrite($fp, $rawdata);
    fclose($fp);

I might patch it myself if I need to.

drupalninja99’s picture

ok i see whats going on now, this is a better patch for youtube:
http://drupal.org/files/media_youtube-empty-thumbnails-1180386-alt.patch

Assuming this works I will test for vimeo as well and I will just roll my own patches for these modules so that we can use them with openchurch until they get patched permanently.

It will be a problem for any similar module that tries to do the same thing but I just want to be able to use our video modules on webenabled & other hosts that disable remote fopen.

drupalninja99’s picture

Going to upload my own diff patches and add those to the build as a workaround for this issue.

drupalninja99’s picture

OK Uploading my 2 patches. Going to test some locally, then add them to the 2x dev package.

drupalninja99’s picture

tests worked locally, now going to roll patches into .make

drupalninja99’s picture

Status: Needs work » Needs review

okay this is now in 2x head, so when the 2x dev package gets updated it will have this fix, yay! I would suspect this will make it to the next version of vimeo & youtube hopefully so that we won't need these patches for too long.

drupalninja99’s picture

Status: Needs review » Fixed

This is now in 1x dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.