forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upgrading => Topic started by: Ariane on October 15, 2010, 08:17:27 pm

Title: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 08:17:27 pm
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):

Code: [Select]
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.
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Nibbler on October 15, 2010, 08:40:14 pm
Try disabling "Display number of comments below the thumbnail"
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 08:44:49 pm
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?
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: 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?
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 08:50:20 pm
The "Album thumbnail" is set to "Last Uploaded".
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 08:53:18 pm
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.
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Nibbler on October 15, 2010, 09:09:19 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.
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 09:11:02 pm
Done!
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Nibbler on October 15, 2010, 09:21:57 pm
OK, you should be able to re-enable the comment counts now.
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Ariane on October 15, 2010, 09:26:27 pm
Done, and it's working! :D Thank you so much!
Title: Re: Critical error after upgrade from 1.4.27 to 1.5.8
Post by: Pacjack on January 02, 2011, 05:59:52 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!