Autogenerated thumbnail sticks and is not replaceable by new video/image uploaded

glen201 - June 19, 2009 - 02:03
Project:Video
Version:6.x-2.3
Component:Code
Category:bug report
Priority:minor
Assigned:glen201
Status:needs work
Description

After the initial creation of the thumbnails and the associated image (thumbnail) node, any subsequent change to the video will not update the thumbnail image. In addition, if the thumbnail node is deleted, it will not be recreated when the video file is re-uploaded. If a new thumbnail file is directly specified (as a uploaded file), it will not replace the thumbnail in the node. The only thing working is the first upload and initial autothumbnail - to update the thumbnail you must either edit the thumbnail node directly using the image module, or you have to delete the video/thumbnail nodes and start over.

Does anyone have any clue as to why this might be happening? Developers??!

-- glen

#1

glen201 - June 21, 2009 - 06:45

OK, well I couldn't wait for the developers to weigh in, and I debugged it myself (I am doing a lot of that with this module in the past 2 weeks). The fix is to find the comment below in the video_image.module file and replace the commented out version with the new version:

original:

// delete the old images?
    $oldimage->new_image = 1;

replace with

      // delete the old images?
//GMM: Fix to use the correct flag for image module to resave derivative images
    //  $oldimage->new_image = 1;
      $oldimage->new_file = true;

Developers: this looks like a change made to the Image module internals was a gotcha on your version. It's not "safe" to poke variable names in other peoples' modules to achieve your goals, now is it???!

Enjoy,
-- glen

#2

heshanmw - June 21, 2009 - 07:12
Assigned to:Anonymous» heshanmw

@glen, I saw your doing a great job while I'm a little busy these days to work with the issue queue, I would like to add you as a co-maintainer if you prefer to work with me.

#3

glen201 - June 21, 2009 - 23:14

I sent you an email on your gmail.com account - let's discuss offline.

-- glen201

#4

glen201 - July 26, 2009 - 06:39
Version:6.x-2.x-dev» 6.x-2.3
Priority:critical» minor
Assigned to:heshanmw» glen201
Status:active» needs work

Applied this patch to 6.x-2.4. This fixes the problem of regenerating the derivative images
BUT only in the case where the originally generated thumbnail node exists.

If the thumbnail node is deleted, currently the video node would have to be deleted and re-created to reestablisth the thumbnail.
This will be looked at for a later release

--glen

#5

captix - July 24, 2009 - 12:51

is 6x module work fine now?

i will update my drupal to 6x if it is ok

 
 

Drupal is a registered trademark of Dries Buytaert.