What Do You Need In The Xf2 Xengallery Version? Vote for your choices here: http://www.sonnb.com/threads/what-do-you-need-in-the-xf2-xengallery-version.1539/

Help Thumbs Not Being Generated

Discussion in 'XenGallery' started by Mehdi, Feb 20, 2017.

  1. Mehdi

    Mehdi Authorized Member Authorized

    Still not working..
     
  2. Mehdi

    Mehdi Authorized Member Authorized

  3. sonnb

    sonnb Administrator Staff Member

    I am working on it now.
     
  4. sonnb

    sonnb Administrator Staff Member

    With the same modification, it works for me. Are you sure the new video thumbnails work?
     
  5. Mehdi

    Mehdi Authorized Member Authorized

    Yes, https://www.evernote.com/l/AFoffCmZ3Z9PRoM8TqGDFy5jeLzheeZ_UW4

    Can you tell me exactly how/what to rebuild after i make the modification please ? I just did thumbnails and thumbnail informations.. may be something else needs to be rebuilt ?


    Mehdi
     
  6. Mehdi

    Mehdi Authorized Member Authorized

    ......
     
  7. sonnb

    sonnb Administrator Staff Member

    That are the correct option to rebuild. I just curios why it does not work on your site because with the same modification I verifies it works locally. Can I have access to debug if possible?
     
  8. Mehdi

    Mehdi Authorized Member Authorized

    What do you need me to do and what debug information do you need ?
     
  9. Mehdi

    Mehdi Authorized Member Authorized

    Starting to get tired of this honestly .... how the hell do I fix this ?

    @sonnb
     
  10. shabbirbhimani

    shabbirbhimani Authorized Member Authorized

    I am developer of Mehdi and I was looking into this issue further for him.

    I just checked the code where you mentioned the changes and found that $contentData is always null because it is being called from

    Code:
    sonnb_XenGallery_Deferred_Content::execute
    function where the second param is never passed

    Code:
    $dw->rebuildCounters($data);
    So in Photo.php we have

    Code:
    if ($contentData === null)
           {
               $contentData = $contentDataModel->getDataByDataId($this->get('content_data_id'));
           }
    
    Which is missing in Video.php

    After adding this the if condition is executed and the code to generate the thumbnail works but then we have second issue is in

    createContentDataThumbnailFiles where we have $engine as empty and $storeOptions as empty but still the thumbnail should be created from createContentDataThumbnailFile but it copies the content of the default thumbnail only.

    I also checked and saw the temp files being generated inside internal_data folder has the current thumb data but the data folder contains the wrong thumb data. If I manually copy the file from internal_data to data, thumb works fine but again it is never regenerated.

    As far as my understanding of code to regenerate thumbnails goes, it should never create new thumbnails of the media again because data conditionals make it to so. Let me know if I am missing something or if it is working on your end, how it is generating the thumbnail.
     
  11. sonnb

    sonnb Administrator Staff Member

    Sorry for the late reply. And thanks for involving a developer here to resolve our issue. Usually when a customer faces an issue, they give me access to their code where I can debug and fix the issue. You seem unable to share due to your privacy so it is quite hard for me to explain. But anyway, it is my fault that makes this issue last long.
    Thanks for your finding. I will check and reply you end of today.
     
  12. sonnb

    sonnb Administrator Staff Member

    The createContentDataThumbnailFiles method relies on the data returned from Youtube (which of course contains the thumbnail URL).

    This data is returned in the following line:
    $embedData = $contentDataModel->getEmbedVideoData($videoData['video_type'], $videoData['video_key']);

    Could you check if $embedData (of the videos that are not being generated the correct thumbnails) is correct?
     

Share This Page