cat-e-log bug?

A historical forum for issues reported in the suggestions and bugs forum that have been subsequently fixed or resolved.
Post Reply
User avatar
DutchFry
Posts: 748
Joined: 14 Sep 2007, 13:34
My images: 12
My cats species list: 16 (i:0, k:0)
My aquaria list: 2 (i:2)
Spotted: 9
Location 1: The Hague
Location 2: The Netherlands

cat-e-log bug?

Post by DutchFry »

Hello,

I have a problem with the catelog. for example, when visiting the L204 factsheet, everything seems to be working fine, but when i click on 'Ucayali' to find out what other species live there, i get the following bug:

[Mod edit: Remove SQL code ...]

i'm not sure if this is only the case with this particular factsheet or with all of the factsheets. hope you can fix it cause this feature is very welcome for me!

thanks in advance
Greetings, Tim
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 10 (i:8)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: cat-e-log bug?

Post by MatsP »

Yes, that goes wrong, as can be evidenced here:
http://www.planetcatfish.com/catelog/se ... order=hits

I've edited the original post, as we probably don't actually want people to see the SQL code that the Cat-eLog uses [it probably shouldn't show it in the page either].

I think it's the "search for pH" feature that caused this to happen - strange that it's taken this long to surface tho'.

Jools: Do you want me to fix this [you'll have to send me the latest version] - I may have time to test it out on Wednesday evening - no promise of course...

Edit: Actually, the fix is probably trivial: Just check if max/min pH values are "blank", and take that as "not in use" as well as "Unset" or whatever it is from the search page.

Dutchfry: As a workaround, you can use the http://www.planetcatfish.com/catelog/search.php and search for the Ucayali in there.

--
Mats
User avatar
DutchFry
Posts: 748
Joined: 14 Sep 2007, 13:34
My images: 12
My cats species list: 16 (i:0, k:0)
My aquaria list: 2 (i:2)
Spotted: 9
Location 1: The Hague
Location 2: The Netherlands

Re: cat-e-log bug?

Post by DutchFry »

ok Mats, thanks for looking into this.

i'm sorry for posting the error, i'm not so good with computers so i didn't understand there was sensitive information in that error :oops:

but when i click the URL you provided above, i still see this error. (just to let you know.)

thanks again :thumbsup:
Greetings, Tim
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 10 (i:8)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: cat-e-log bug?

Post by MatsP »

DutchFry wrote:ok Mats, thanks for looking into this.

i'm sorry for posting the error, i'm not so good with computers so i didn't understand there was sensitive information in that error :oops:

but when i click the URL you provided above, i still see this error. (just to let you know.)

thanks again :thumbsup:
Yes, but once the SQL code (or rather, the PHP that generates the SQL) is FIXED, it will not give anything valuable to someone with ill-intents.

--
Mats
User avatar
DutchFry
Posts: 748
Joined: 14 Sep 2007, 13:34
My images: 12
My cats species list: 16 (i:0, k:0)
My aquaria list: 2 (i:2)
Spotted: 9
Location 1: The Hague
Location 2: The Netherlands

Re: cat-e-log bug?

Post by DutchFry »

not understandig a word of what you just said, i'm sure it's ok now :D

and thanks a lot for the workaround!
Greetings, Tim
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 10 (i:8)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: cat-e-log bug?

Post by MatsP »

What I'm saying is that once the bug is fixed, the link will work, and there will be no record of SQL code in the forum for everyone to see.

--
Mats
User avatar
Jools
Expert
Posts: 16277
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:235, k:1)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: cat-e-log bug?

Post by Jools »

I've removed the SQL from the error message and will send the code to Mats for fixing (Thanks!).

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 10 (i:8)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: cat-e-log bug?

Post by MatsP »

Ok, I probably won't be able to fix it until Monday evening.

--
Mats
User avatar
Jools
Expert
Posts: 16277
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:235, k:1)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: cat-e-log bug?

Post by Jools »

Fixed.

Mainly for Mats interest, if the search was called from the search page, the min_ph or max_ph values were set to "Unset" if unset. However, we also use the search for things like show me all the fishes in the Orinoco and THAT passed in null ph values. The database (since moving latest migration/upgrade) is more picky about such things and so the query failed.

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 10 (i:8)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: cat-e-log bug?

Post by MatsP »

I don't think this was an actual "more picky database" problem - I'm pretty convinced that the older version of database also complains if arguments are missing to comparison operators (eg. "where X >= AND Y <= ..." is not valid SQL in any implemenation that I know of - I certainly had such problems when developing the code in question).

It's probably just that no one that tried it was bothered to complain.

And Jools, I think it was your changes to my pH code that actually broken things, because I just had a field that was empty when it wasn't being used - you added fancy selection lists that give a value of "unset" - not saying that I wouldn't have made the same thing, had I had the code to do the pH "select from a list" myself.

Edit: and thanks for fixing it!

--
Mats
User avatar
DutchFry
Posts: 748
Joined: 14 Sep 2007, 13:34
My images: 12
My cats species list: 16 (i:0, k:0)
My aquaria list: 2 (i:2)
Spotted: 9
Location 1: The Hague
Location 2: The Netherlands

Re: cat-e-log bug?

Post by DutchFry »

thanks a lot Jools and Mats!!
Greetings, Tim
Post Reply

Return to “All Resolved Issues”