• 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

Fatal error on accessing album links after update

Status
Not open for further replies.

cos

Chevereto Member
Hi,

I've updated to the latest version and everything went fine with the one exception that it throws an error when accessing album links. I can create albums and delete them but can't access them. The chv_albums table contains the entries as it should and I tried repairing it but did not fix it. I get this error:

Fatal error [400]: SQLSTATE[42000]: Syntax error or access violation: 1065 Query was empty
Triggered in /app/lib/classes/class.album.php at line 77

Stack trace:
#0 /app/routes/route.album.php(43): CHV\Album::getSingle('2953', true, true, Array)
#1 /lib/G/classes/class.handler.php(232): G\Handler->{closure}(G\Handler)
#2 /lib/G/classes/class.handler.php(132): G\Handler->processRequest()
#3 /app/loader.php(806): G\Handler->__construct(Array)
#4 /index.php(20): include_once('/app/loader.php')


Thank you!
 
When you get "Query was empty" means that the system tried to issue an empty query, it has no relation with running a repair command in your DB. Having an empty query on that method is really odd.

Change this:
Code:
        if ($sumview) {
            $query .= 'UPDATE '.$tables['albums'].' SET album_views = album_views + 1 WHERE album_id=:album_id';
        }

To this:
Code:
        if ($sumview) {
            $query .= 'UPDATE '.$tables['albums'].' SET album_views = album_views + 1 WHERE album_id=:album_id';
        }
        var_dump($query);

What you get?
 
Hi Rodolfo,

This is what I get:

string(339) "SELECT * FROM chv_albums LEFT JOIN chv_users ON chv_albums.album_user_id = chv_users.user_id LEFT JOIN chv_likes ON chv_likes.like_content_type = "album" AND chv_albums.album_id = chv_likes.like_content_id AND chv_likes.like_user_id = 1 WHERE album_id=:album_id; UPDATE chv_albums SET album_views = album_views + 1 WHERE album_id=:album_id"Aw, snap! Internal Server Error - Check your error_log or enable debug_mode = 3 (chevereto.com/docs/debug).


Thanks
 
If $query has something then I don't understand why you get a "query was empty" error. Not saying that the error isn't there, just saying that the information provided has no sense.

I'm sorry but I can't replicate this issue and I'm not seeing this as a bug because it only affects your installation. You should try using a different server or review your db server settings. Try to use the most standard package you can find.
 
Unfortunately, this ticket has more than seven days without a reply or feedback from the original poster. We will now consider this ticket abandoned and its now closed.

Don't hesitate to create a new ticket if this matter is still causing you issues.

Ticket closed.
 
Status
Not open for further replies.
Back
Top