I upgraded a gallery of mine from 1.4.27 to 1.5.8, and I'm getting the following error when trying to access one of the top categories (named Photos):
Critical error
There was an error while processing a database query.
While executing query 'SELECT COUNT(*) FROM cpg14x_comments WHERE pid = ' in include/functions.inc.php on line 2436
mySQL error: 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 '' at line 1
File: /home/withholdingmyusername/public_html/gallery/include/functions.inc.php - Line: 263
Error URL: http://gallery.v-fans.net/index.php?cat=9
I have tried:
- reuploading freshly downloaded CPG 1.5.8 files via Filezilla and rerun update.php
- by uploading a zip and unzipping it with cpanel's file manager and rerun update.php
- deleted the cookies and cache of my browser to make sure I was seeing the current version of the page
- deleted all files except for the albums folder and include/config.inc.php, reuploaded 1.5.8 files and rerun update.php
The error persists. I searched the forum with various word combinations from the error, but couldn't find anything that matched my error situation (as far as I understand).
I have enabled debug for all users, and made a test account:
Test login account/password: vtestuser/psdEvuds7e34jvbsl
Server info:
PHP version: 5.3.3
Apache version: 2.2.16
MySQL version: 5.0.91-community
Can you help? If you need more information, just let me know what.
Try disabling "Display number of comments below the thumbnail"
That removed the error and I could load the page normally! :) But I'm wondering, I have it enabled on other 1.5.8 sites and none of them has this error. Is this something that can be fixed or should I just leave it unabled permanently on this site?
Hopefully we can get this fixed. What image have you selected as the album thumbnail for http://gallery.v-fans.net/thumbnails.php?album=1 ? Is it not approved or something?
The "Album thumbnail" is set to "Last Uploaded".
Couldn't see edit button to edit my last reply - all the pics should be automatically approved when I upload them. I'm the only administrator and always have been.
Quote from: Ariane on October 15, 2010, 08:50:20 PM
The "Album thumbnail" is set to "Last Uploaded".
Are you sure? If it's already set to "Last uploaded" on the album page press "update" anyway.
Done!
OK, you should be able to re-enable the comment counts now.
Done, and it's working! :D Thank you so much!
Quote from: Nibbler on October 15, 2010, 08:48:33 PM
Hopefully we can get this fixed. What image have you selected as the album thumbnail for http://gallery.v-fans.net/thumbnails.php?album=1 ? Is it not approved or something?
I have had this issue too (http://forum.coppermine-gallery.net/index.php/topic,68552.0.html) after upgrading from 1.4.25 to 1.5.10. The image used did not exist anymore. I have edited the album and set another thumbnail image.
Thanks Nibbler!