forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: shinsui on June 28, 2010, 11:58:04 am

Title: click categories gives database query error
Post by: shinsui on June 28, 2010, 11:58:04 am
If I click on my album categories, i.e. (http://thorinsgate.nl/index.php?cat=2) I get this while logged in as administrator:

Template error
Failed to find block 'file_line' (#<!-- BEGIN file_line -->(.*?)<!-- END file_line -->#s) in :

                    <div class="{CSS_CLASS}">
                        <h2>{HEADER_TXT}</h2>
                        <span class="cpg_user_message">{MESSAGE}</span>


                        <br /><br />
                    </div>

If I'm -NOT- logged in I see this Critical error
There was an error while processing a database query
warning on my screen.

This is NOT an upgrade issue. I got this doing an upgrade, but when I could not get rid of this I did a fresh install of the latest coppermine and recreated all albums. alas, the issue remains. Is this a known bug?

Thx, Dick
Title: Re: click categories gives database query error
Post by: Αndré on June 28, 2010, 02:21:36 pm
Quote
Forbidden

You don't have permission to access /index.php on this server.
Title: Re: click categories gives database query error
Post by: shinsui on June 28, 2010, 03:39:57 pm
You're right. Because I am reinstalling my photobase I closed Apache (thorinsgate.nl) for the outside world. I'd forgotten about it. It's opened for now. Not much to see yet. I first want to make sure the error can be solved before I reinstall all my older albums again. I love what I''ve seen so far. Coppermine is my favo over gallery3. Hope to hear from you.
Title: Re: click categories gives database query error
Post by: Αndré on June 28, 2010, 03:49:50 pm
Please enable debug mode.
Title: Re: click categories gives database query error
Post by: shinsui on June 28, 2010, 07:04:46 pm
DONE. Is enabled for everyone. Hope this is not unsafe?
Title: Re: click categories gives database query error
Post by: Αndré on June 28, 2010, 07:49:31 pm
Quote
mySQL error: Lost connection to MySQL server during query
Please google for that error message.
Title: Re: click categories gives database query error
Post by: shinsui on June 28, 2010, 08:08:07 pm
Please google for that error message.
I think this is too easy. I run quite a few databases (three for TYPO3, a CMS system, another three for some Wordpress installations and some for Textpad and a few test sites. The -ALL- work well and have NO database query errors. Not had the former coppermine release btw. It ran fast and well too. It has to be someting in the code that trickers this MySQL error.
Title: Re: click categories gives database query error
Post by: Αndré on June 28, 2010, 08:32:32 pm
You're the first person who reports that issue. It seems that nobody else has that issue. I cannot replicate it in my testbeds, so you have to perform some tests or give us more information about your MySQL settings etc.
cpg1.5.6 performs a lot of other db queries that don't return errors.
Title: Re: click categories gives database query error
Post by: shinsui on June 28, 2010, 09:47:22 pm
Tell me about the tests you want performed. I'm very curious myself too, because, as said, other software that heavely uses MySQL/PHP does not have issues.
Title: Re: click categories gives database query error
Post by: shinsui on June 28, 2010, 10:20:38 pm
Another thing. I just performed a check with a testbed for coppermine 1.5.6. I had the same category and two -EMPTY albums. Clicking on the category did not generate an error. Then I filled one album with pictures, clicked on the category again and got the same error as describes for my main photosite.
Title: Re: click categories gives database query error
Post by: Phill Luckhurst on June 28, 2010, 11:14:18 pm
It is a strange one that I cvannot replicate. On my testbed I get that error message if I type in a cat number that doesn't exist. The mesage is a little missleading and I am not sure why the software thinks for some reason cat=2 on your setup is not there.
Title: Re: click categories gives database query error
Post by: Αndré on June 29, 2010, 08:11:39 am
@Phill: don't draw the wrong conclusions from the improper error message "There was an error while processing a database query". If you enable debug mode, you'll get different error messages.
Title: Re: click categories gives database query error
Post by: Phill Luckhurst on June 29, 2010, 08:37:28 am
I think what I wrote came accross incorrectly. It is just that the error message seems wrong to me if an incorrect cat link is given. I think a
Code: [Select]
$lang_errors['non_exist_cat'] = 'The selected category does not exist'; message should be displayed. For example look here - http://coppermine-gallery.net/demo/cpg15x/index.php?cat=5 . There I miss-type the cat number to 5 instead of 2 and we get the database error rather than the correct error message. This part of the thread should be in the bug section I think.
Title: Re: click categories gives database query error
Post by: Αndré on June 29, 2010, 08:52:19 am
Please lets only discuss the error message here, that shinsui gets if he re-enables debug mode:
Quote
mySQL error: Lost connection to MySQL server during query

I'll have a look at the issue (wrong error message) you reported now. Currently no need for an extra thread in the bugs board, unless I cannot fix it instantly ;)
Title: Re: click categories gives database query error
Post by: Αndré on June 29, 2010, 09:10:01 am
I think a
Code: [Select]
$lang_errors['non_exist_cat'] = 'The selected category does not exist'; message should be displayed.
Fixed in r7725.
Title: Re: click categories gives database query error
Post by: Phill Luckhurst on June 29, 2010, 09:32:09 am
Well done Andre
Title: Re: click categories gives database query error
Post by: shinsui on June 29, 2010, 07:07:24 pm
Does this mean the error will be gone in a future update?
Newly created categories show the same error.
The pictures are accessable, the albums are, but clicking on a category does not work.
Title: Re: click categories gives database query error
Post by: Αndré on June 29, 2010, 07:33:57 pm
Does this mean the error will be gone in a future update?
No. I just fixed an issue Phill detected while testing your issue.

If you want to know it for sure, update your gallery with the latest svn checkout.

This still applies:
You're the first person who reports that issue. It seems that nobody else has that issue. I cannot replicate it in my testbeds, so you have to perform some tests or give us more information about your MySQL settings etc.
cpg1.5.6 performs a lot of other db queries that don't return errors.
and re-enabling debug mode cannot hurt.
Title: Re: click categories gives database query error
Post by: shinsui on June 29, 2010, 08:25:42 pm
Debug mode is re-enabled.
And about your second quote: I already asked you what tests I could perform to help finding the solution. I did not get an answer to this question though. I don't want to bug about, I know how busy most of you are, I also don't want to complain, but it does not work and that's odd. The 1.4 series worked very well.
Title: Re: click categories gives database query error
Post by: shinsui on June 29, 2010, 08:28:33 pm
It is a strange one that I cvannot replicate. On my testbed I get that error message if I type in a cat number that doesn't exist. The mesage is a little missleading and I am not sure why the software thinks for some reason cat=2 on your setup is not there.
I'm not sure either. Fact is however that NO category whatsoever seems to exist. If I create a new one and create some albums in it it too does not exist, be it cat=3 cat=4, you name it. The albums and pictures are found (and exist). Categories can't be clicked on.
Title: Re: click categories gives database query error
Post by: Αndré on June 29, 2010, 08:34:06 pm
I'm not sure either. Fact is however that NO category whatsoever seems to exist. If I create a new one and create some albums in it it too does not exist, be it cat=3 cat=4, you name it. The albums and pictures are found (and exist). Categories can't be clicked on.
That is a different issue! It has nothing to do with your report.


I'll close this topic, as we are talking about too many issues in this thread. Please start a new thread with at least "Lost connection to MySQL server during query" in the subject. You can also refer to this thread. Thank you.