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/

Fixed Uploaded Videos Do Not Delete When Album Is Hard Deleted

Discussion in 'Bug Reports' started by In Social, Jan 20, 2016.

  1. In Social

    In Social Authorized Member Authorized

    We noticed this while trying to clean up some soft deleted albums. If an album contains uploaded videos and you hard delete the album, the videos are not deleted. The physical file is still left on the server and the xengallery_content table still has a record for the video. This causes the video to be orphaned and it cannot be opened (or deleted) because it is no longer associated with a valid album.
     
  2. sonnb

    sonnb Administrator Staff Member

    Thanks for your report.
     
  3. In Social

    In Social Authorized Member Authorized

    Any chance for a fix?
     
  4. sonnb

    sonnb Administrator Staff Member

    Yes of course. I will check and report back to you this weekend.
     
  5. sonnb

    sonnb Administrator Staff Member

    I am still checking
     
  6. sonnb

    sonnb Administrator Staff Member

    Okay. I found my stupid issue with this bug.

    Please do as following. Open library/sonnb/XenGallery/DataWriter/Album.php.
    Line 462:
    PHP:
    $contents $this->_getContentModel()->getContentsInAlbumSimple($this->get('album_id'), sonnb_XenGallery_Model_Photo::$contentType);
    Change to:
    PHP:
    $contents $this->_getContentModel()->getContentsInAlbumSimple($this->get('album_id'),
    $contentType);
    Sorry for this inconvenience.
     
    whynot likes this.
  7. In Social

    In Social Authorized Member Authorized

    Thanks for this. May I suggest you update the addon to incorporate this new code.
     
  8. sonnb

    sonnb Administrator Staff Member

    Yes of course. I already updated it on my local development. I suggest you to change manually for now to fix it. As discussed in the conversation, I will push a fix next week (Probably this weekend).
     

Share This Page