• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Image album slice broken with S3

Status
Not open for further replies.

lonepress

Chevereto Member
For images in S3, image_album_slice.php fails to show the thumbnails of images in the album.

The problem is that the DB query in getAlbumSlice doesn't join on the storages table, so Image::getSrcTargetSingle thinks it is operating on a local path rather than a URL.

I was able to fix it by adding the join in the DB query, in Image::getAlbumSlice:

PHP:
            $db->query('SELECT * FROM (
                    (SELECT * FROM '.$tables['images'].' LEFT JOIN '.$tables['storages'].' ON '.$tables['images'].'.image_storage_id = '.$tables['storages'].'.storage_id
                    WHERE image_album_id=:image_album_id AND image_id <= :image_id ORDER BY image_id DESC LIMIT 0,'.($padding*2 + 1).')
                    UNION
                    (SELECT * FROM '.$tables['images'].' LEFT JOIN '.$tables['storages'].' ON '.$tables['images'].'.image_storage_id = '.$tables['storages'].'.storage_id
                    WHERE image_album_id=:image_album_id AND image_id > :image_id ORDER BY image_id ASC LIMIT 0,'.($padding*2).')
                ) images ORDER BY images.image_id ASC');
 
Last edited by a moderator:
You are right, I forgot that Join. Thank you for add it, I will push it for the next release.

By the way, that also affects the class.listing.php

PHP:
$db->query('SELECT * from '.$tables['images'].' LEFT JOIN '.$tables['storages'].' ON '.$tables['images'].'.image_storage_id = '.$tables['storages'].'.storage_id WHERE image_album_id=:album_id ORDER BY image_date ASC LIMIT 0,5');
 
Last edited:
Status
Not open for further replies.
Back
Top