Forum OpenACS Development: Deleting a photo in photo album gives error

Hi,

Deleting a photo in album gives error.

pa_photo__Delete() is giving error >>

ERROR: update or delete on "acs_objects" violates foreign key constraint "acs_objects_context_id_fk" on "acs_objects"

DETAIL: Key (object_id)=(9384) is still referenced from table "acs_objects".

sql : pa_photo__Delete('3567')

anyhelp is appreciated ? wat is the fix for this.......

-- Ashwin Kumar

Collapse
Posted by Gustaf Neumann on
Ashwin,

this message means that you are trying to delete an acs_object , where there is another object with an context_id referencing it. try

select * from acs_objects where context_id = 9384

to locate the object. did you insert the items to the photo album programmatically or are you use using the web interface?

I have noticed a similar problem with xowiki, which was caused by a property of the content_item__new sql function, that creates revision items by its own, when either "data" or "text" or "title" are provided by the call.

When you are just using the web-interface, this might be a bug in photo-album (which i don't know).