Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Critical Error - There was an error while processing a database query  (Read 5125 times)

0 Members and 1 Guest are viewing this topic.

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven

I recently upgraded my Galleries from 1.4.27 to 1.5.10, and have since come across the following error on a few categories:

Quote
Critical Error
There was an error while processing a database query

This has happened on random categories - http://www.nkidman.com/gallery/index.php?cat=27 and http://www.isabellucasonline.org/gallery/index.php?cat=36 being two, although they are both fixed at the moment.

On http://www.isabellucasonline.org/gallery/index.php?cat=36 the error stopped showing after a little while and I was able to view the category. On http://www.nkidman.com/gallery/index.php?cat=27 I did some further research here and found someone mention a fix of disabling comment views below thumbnails. I tried that and the error message went away.

My question is, is it possible to allow the display of number of comments under thumbnails without getting this error? I couldn't find an answer to this here, but apologies if I have missed it. I'm also wondering if there's any other way I can prevent this error from occuring, seeing as it happened and then disappeared at http://www.isabellucasonline.org/gallery/index.php?cat=36 without me editing the comment thing etc.

Thanks for any help.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Critical Error - There was an error while processing a database query
« Reply #1 on: January 05, 2011, 02:34:42 pm »

Enable debug mode so we can see the actual error message.
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: Critical Error - There was an error while processing a database query
« Reply #2 on: January 05, 2011, 03:36:38 pm »

Debug mode and notices in debug mode have now both been enabled on both http://www.nkidman.com/gallery/ and http://www.isabellucasonline.org/gallery/

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Critical Error - There was an error while processing a database query
« Reply #3 on: January 05, 2011, 03:51:24 pm »

Of course you need to enable the settings where the error occurs ;) If you don't want to retain your gallery in that state, just enable the settings, copy the detailed error message to this thread and disable the settings.
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven
Re: Critical Error - There was an error while processing a database query
« Reply #4 on: January 05, 2011, 04:13:45 pm »

Ah got it, oops!

At the moment it's only one category so I'll leave the debug and notices up for now: http://www.nkidman.com/gallery/index.php?cat=27

As I said, the error on http://www.isabellucasonline.org/gallery/index.php?cat=36 stopped showing by itself, so I can't do anything to get it up again for you to see the error notices.

Thanks
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Critical Error - There was an error while processing a database query
« Reply #5 on: January 05, 2011, 04:22:43 pm »

It's very hard to debug that without access to your website.

Quote
include/functions.inc.php on line 2445
belongs to the function count_pic_comments, which is called inside function build_caption:
Code: [Select]
       if ($CONFIG['display_comment_count']) {
            $comments_nr = count_pic_comments($row['pid']);
            if ($comments_nr > 0) {
                $caption .= '<span class="thumb_num_comments">' . sprintf($lang_get_pic_data['n_comments'], $comments_nr) . '</span>';
            }
        }
which is called at several places at the code.


You can test several things:
1. disable the plugin engine, if you have installed some plugins
2. remove 'lastup' and 'random' from the content of the main page in Coppermine's config.
3. upload the theme 'curve' (you don't need to enable it, we can use that theme by adding the parameter
Code: [Select]
?theme=curve to the address bar)
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven

Hello again,

I thought the error had stopped, but it appears not. I hope it's ok to bring this thread up again.

Doing the things you suggested:

1. I have disabled all plugins at http://www.nkidman.com/gallery/

2. I have removed 'lastup,1/random,1/onlinestats' from the 'The content of the main page'

3. 'curve' theme has been uploaded

All at http://www.nkidman.com/gallery/

Let me know if you need more info.

Thanks in advance for any further help...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

1. I have disabled all plugins at http://www.nkidman.com/gallery/

2. I have removed 'lastup,1/random,1/onlinestats' from the 'The content of the main page'

3. 'curve' theme has been uploaded
Does the error still occur? If yes, where/when? I had a (very) short look at your gallery and it seems to work as expected.
Logged

kateheaven

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 78
    • Kate Hudson Heaven

Yes, but only in one category from what I have noticed: http://www.nkidman.com/gallery/index.php?cat=27
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page

Something might be wrong with your theme.
The page source of your login page shows:
Quote
<!--Coppermine Photo Gallery 1.5.12 (stable)-->
</body>
</html>

  
<!--Coppermine Photo Gallery 1.5.12 (stable)-->
</body>
</html>
Which does not look right.

Try using:
http://www.nkidman.com/gallery/index.php?theme=curve  
for a test
------------Edit
I looked at your site with Curve and that is not the problem - the theme will need to be fixed eventually...

Set Config >> Thumbnail view >> Display number of comments below the thumbnail to off (unchecked) for a test.
And also check your db for errors - backup and repair if needed.
------------/Edit
« Last Edit: May 06, 2011, 01:45:25 am by Joe Carver »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

If I remember right that error occurs if you've setup an album thumbnail that doesn't exist anymore. Try to update all album's thumbnails in that category.
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.