Forum OpenACS Q&A: Response to photodb for openACS

Posted by Lachlan Myers on
Thanks for the photodb for OpenACS ... its very exciting!

I hope to modify it for artists works. I've been playing around and found a minor problem (see below), but I'm not sure if SDM bug reports are appropriate for this situation. So here it is!

The additional code for STATE ("None of the above") in photo-add.tcl and photo-edit.tcl works fine for data entry and successfully sets ph_photos.state = "".

The problems arise when using the Admin is checking recent addtions to the gallery (this brings up the gallery successfully) and then clicks one of the images to get single image plus details. The photodb/admin/photo.tcl has a SELECT which relies on

ph_photos.state = states.usps_abbrev

... which cannot match as that second table has no blank field, and the tcl returns the error condition "this form requires a photo_id".

Solution might be as simple as augmenting the "states" table or as complex as adding code and a new table allowing user entry of non US states. I'm taking the first alternative!

Second minor problem is a type mismatch between states.usps (char(2)) and ph_photos.state (varchar(2)). I have changed the type using

text(ph_photos.state)= states.usps_abbrev

but would appreciate advice on any preferable method