forum.coppermine-gallery.net

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: ysidoro on September 11, 2004, 03:55:12 am

Title: broken query for "last comments" in cat=0
Post by: ysidoro on September 11, 2004, 03:55:12 am
When I ask for "New Comments" from first page, I receive the following error:

There was an error while processing a database query.

While executing query "SELECT COUNT(*) from cpg11d_comments, cpg11d_pictures  WHERE approved = 'YES' AND cpg11d_comments.pid = cpg11d_pictures.pid AND ( )" on 0

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

If I ask for "New Comments" from any other page (or album) the error is not present.

Please, confirm me if I need to post in another place, I do not found a dev-beta forum
Title: Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
Post by: Tarique Sani on September 11, 2004, 05:27:06 am
Can anyone else confirm this?
Title: Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
Post by: mstralka on September 11, 2004, 06:15:53 am
Are you sure you have the right database?  Your table name starts with cpg11d - cpg 1.4 would start with cpg140
Title: Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
Post by: Tarique Sani on September 11, 2004, 06:29:02 am
Ahhh!! I get a hint from mstralka's query - have you run the latest update.php?
Title: Re: include/functions.inc.php - Line: 160 error CVS version 1.4.0
Post by: Casper on September 11, 2004, 02:04:07 pm
Are you sure you have the right database? Your table name starts with cpg11d - cpg 1.4 would start with cpg140

This is not quite correct.  It would be if it was a new install, but if an upgrade will be the original prefix of the version first installed.

There is no support for the dev version yet, as it is for developers and experienced users only, and this is why the 1.4 board is not visible to normal users yet..  Locking this thread.
Title: broken query for "last comments" in cat=0
Post by: Joachim Müller on October 14, 2004, 08:39:04 am
Maybe it's just me (I'm still a bit ashamed of my previous report that turned out to be a hoax), but I think there's something broken in the devel branch: when clicking on "last comments" in the root category (or with no particular category selected at all), I get
Quote
There was an error while processing a database query.
While executing query "SELECT COUNT(*) from cpg_test_comments, cpg_test_pictures  WHERE approved = 'YES' AND cpg_test_comments.pid = cpg_test_pictures.pid AND ( )" on 0

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: /opt/root/home/wein-aus-argentiniende/public_html/coppermine/include/functions.inc.php - Line: 160
with debug mode turned on. I guess the var $ALBUM_SET get's filled incorrectly, but I'm not sure why this happens (haven't looked into it too deeply) - maybe this bug has been there for some time, I haven't checked in a while. Could someone look into this please (or prove I'm an a** for reporting yet another hoax bug)?

Thanks

Joachim

P.S. You can see this error "live" on my test gallery at the usual url (won't post it here again, so I don't have to edit this posting once this threads gets public)
Title: Re: broken query for "last comments" in cat=0
Post by: Tarique Sani on October 14, 2004, 08:48:26 am
Confirmed - to make it go away temperorily for visitors - just have atleast one album as admin only ....
Title: Re: broken query for "last comments" in cat=0
Post by: Tarique Sani on November 16, 2004, 11:39:57 am
This should now be fixed in functions.inc.php v 1.134
Title: Re: broken query for "last comments" in cat=0
Post by: cryogenic on November 20, 2004, 06:40:32 am
My functions.inc.php is 1.133 and I still have the same error... when I try to view last comments from the main page when logged in as admin, I get the same error. However, not logged-in users can view last comments just fine. Seems that anyone who has access to ALL of the albums gets this error unless they have an album or category selected.
Title: Re: broken query for "last comments" in cat=0
Post by: Joachim Müller on November 20, 2004, 08:37:16 am
If Tarique says that this is being fixed in version 1.134, you will have to get this version (or a newer one) from the cvs, here's no point in reporting bugs in an older version than that has the fix. Take a look at the instructions how to use cvs (http://sourceforge.net/cvs/?group_id=89658). If you don't want to use a cvs client, you can check out the most recent versions (one by one though) using the web cvs access (http://cvs.sourceforge.net/viewcvs.py/coppermine/devel/).

Joachim
Title: Re: broken query for "last comments" in cat=0
Post by: cryogenic on November 21, 2004, 04:30:13 am
My bad... I was comparing my version to the version listed in my versioncheck.php which did not list the newest version. I didn't see it in CVS when I initially made my post but since then it has appeared and I have upgraded to the 1.134 version.. It appears to be working fine at this point. Thanks. :)
Title: Re: broken query for "last comments" in cat=0
Post by: Joachim Müller on November 21, 2004, 06:41:43 am
I manually update versioncheck.php data every now and then - versioncheck.php is meant for the stable release files mainly, it's not the tool of choice for the devel version. Usage of CVS is recommended, preferably the cvs client software (but web cvs should work as well).

Joachim
Title: Re: broken query for "last comments" in cat=0
Post by: cryogenic on November 21, 2004, 11:34:10 am
Yeah, I've noticed that versioncheck.php occasionally lags behind a version or two. I'd say it's a pain to keep it completely up to date with what's in CVS especially when you have 2-3-4 changes in a 24 hour period. I've normally just been using webCVS as I've not had any luck getting any cvs clients to work on my PC. Now that that one bug has been fixed, I'm quite happy with the stability of cpg.. hopefully we'll see a full release soon. :)
Title: Re: broken query for "last comments" in cat=0
Post by: Casper on November 21, 2004, 11:59:06 am
OT, but in reply to cryogenic,

the instructions in the sourceforge page for using the cvs can be misleading(and nothing we can do about it).  Nibbler has posted a very good instruction, with screenshots, of how to get Tortoise cvs working with our cvs.  A search should find it.
Title: Re: broken query for "last comments" in cat=0
Post by: Tranz on November 21, 2004, 06:05:09 pm
Tortoise CVS makes it easy to update your files with those in the CVS. Just a right-click and select. And that ease makes it easier to keep up with the multiple changes per day.
Title: Re: broken query for "last comments" in cat=0
Post by: cryogenic on November 26, 2004, 08:55:00 am
OT, but in reply to cryogenic,

the instructions in the sourceforge page for using the cvs can be misleading(and nothing we can do about it). Nibbler has posted a very good instruction, with screenshots, of how to get Tortoise cvs working with our cvs. A search should find it.

I cannot, for the life of me, find the post to which you are referring. I searched for tortoise, cvs, tutorial, and every combination thereof and could not find anything even close to being useful. As such, I'll continue my file-by-fille method as tedious as it may be. It's still easier than trying to figure out how to make tortoise work. :)
Title: Re: broken query for "last comments" in cat=0
Post by: Casper on November 26, 2004, 11:07:44 am
Try this http://forum.coppermine-gallery.net/index.php?topic=9994.msg44991#msg44991
Title: Re: broken query for "last comments" in cat=0
Post by: cryogenic on November 27, 2004, 12:46:51 pm
had it setup correctly... forgot to change from "checkout" to "export". *forehead smack*