broken query for "last comments" in cat=0 broken query for "last comments" in cat=0
 

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]

Main Menu

broken query for "last comments" in cat=0

Started by ysidoro, September 11, 2004, 03:55:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ysidoro

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

Tarique Sani

SANIsoft PHP applications for E Biz

mstralka

Are you sure you have the right database?  Your table name starts with cpg11d - cpg 1.4 would start with cpg140
GO IRISH

Tarique Sani

Ahhh!! I get a hint from mstralka's query - have you run the latest update.php?
SANIsoft PHP applications for E Biz

Casper

Quote from: 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

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

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
QuoteThere 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)

Tarique Sani

Confirmed - to make it go away temperorily for visitors - just have atleast one album as admin only ....
SANIsoft PHP applications for E Biz

Tarique Sani

This should now be fixed in functions.inc.php v 1.134
SANIsoft PHP applications for E Biz

cryogenic

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.

Joachim Müller

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. 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.

Joachim

cryogenic

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. :)

Joachim Müller

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

cryogenic

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. :)

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz

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.

cryogenic

Quote from: 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.

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. :)

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

cryogenic

had it setup correctly... forgot to change from "checkout" to "export". *forehead smack*