• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Error after update 3.5.12

Status
Not open for further replies.

Mytob

Chevereto Member
I am getting the following error on the main page after preforming the update from 3.5.11 - 3.5.12. I have updated all files as required and run the install again. Any ideas?

Fatal error [400]:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY image_id DESC
LIMIT 0,24' at line 6
Triggered in /app/lib/classes/class.listing.php at line 220

Stack trace:
#0 /app/routes/route.index.php(191): CHV\Listing->exec()
#1 /lib/G/classes/class.handler.php(206): G\Handler->{closure}(G\Handler)
#2 /lib/G/classes/class.handler.php(110): G\Handler->processRequest()
#3 /app/loader.php(279): G\Handler->__construct(Array)
#4 /index.php(20): include_once('/app/loader.php')
 
Are you absolute sure that you uploaded all the needed files? You didn't skip a route or a theme file?
 
From what I can tell everything in the new version has been uploaded. I has happened on my other site but I just rolled back the changes and all seems to work again.
 
This happened to me after update too.
Temporary fixed it by wrapping lines 144-146 in /app/loader.php with if(Login::$logged_user) clause.

/app/loader.php:143
PHP:
// Translate logged user count labels
if(Login::$logged_user) {
    foreach(['image_count_label', 'album_count_label'] as $v) {
        Login::$logged_user[$v] = _s(Login::$logged_user[$v]);
    }
}

Otherwise, when user is not logged in, $this->requester on line 160 of /app/lib/classes/class.listing.php incorrectly contains
array('image_count_label'=>NULL, 'album_count_label'=>NULL) and doesn't evaluate as NULL thus creating incorrect SQL string with "... chv_albums.album_privacy IS NULL OR chv_albums.album_user_id=) ORDER BY image_id DESC ...".

Maybe that helps.
 
Last edited:
That's right, I just noticed the problem with the count label. I will re-upload 3.5.12 with that fixed. For anyone who have downloaded 3.5.12 just replace app/loader.php with the new one (you will need to re-download or apply the patch that Denpa posted).
 
Did u already updated the loader.php? just updated 3 minutes ago and got this error:
Parse error: syntax error, unexpected '[', expecting ')' in /public_html/app/loader.php on line 113

edit:
i updated the loader.php with the old file from 3.5.11 and i still have the same error, i think the problem is somewhere else

edit2: i found the problem. i had some changes in a .htaccess file which caused the error.

So here is no problem anymore :)
 
Last edited:
Hello,

I had the same problem
I re-downloaded the 3.5.12 zip file and re-upload the "loader.php" file
Everything is OK now

Regards
 
Status
Not open for further replies.
Back
Top