Forum OpenACS Development: Deleting PKG

Collapse
Posted by Iuri Sampaio on
Hi there,

I got the following error after attempting to delete an acs-subsite package.
I believe the error is within core pkgs. Even though I haven't found YET.

Best wishes
Iuri

[16/Nov/2016:18:57:32][27065.b13ecb70][::throttle] Notice: === user 192.199.241.135 entered community 606 at 1479322652 reason switch
[16/Nov/2016:18:57:32][27065.b45ecb70][-conn:iurix:0-] Error: nsdbpg: result status: 7 message: ERROR: update or delete on table "acs_objects" violates foreign key constraint "apm_packages_package_id_fk" on table "apm_packages"
DETAIL: Key (object_id)=(342776) is still referenced from table "apm_packages".
CONTEXT: SQL statement "delete from acs_objects where object_id = 342695"
PL/pgSQL function "acs_object__delete" line 37 at EXECUTE statement
SQL statement "SELECT acs_object__delete (
delete__package_id
)"
PL/pgSQL function "apm_package__delete" line 32 at PERFORM

[16/Nov/2016:18:57:33][27065.b45ecb70][-conn:iurix:0-] Error: Aborting transaction due to error:
Database operation "0or1row" failed (exception ERROR, "ERROR: update or delete on table "acs_objects" violates foreign key constraint "apm_packages_package_id_fk" on table "apm_packages"
DETAIL: Key (object_id)=(342776) is still referenced from table "apm_packages".
CONTEXT: SQL statement "delete from acs_objects where object_id = 342695"
PL/pgSQL function "acs_object__delete" line 37 at EXECUTE statement
SQL statement "SELECT acs_object__delete (
delete__package_id
)"
PL/pgSQL function "apm_package__delete" line 32 at PERFORM
")

ERROR: update or delete on table "acs_objects" violates foreign key constraint "apm_packages_package_id_fk" on table "apm_packages"
DETAIL: Key (object_id)=(342776) is still referenced from table "apm_packages".
CONTEXT: SQL statement "delete from acs_objects where object_id = 342695"
PL/pgSQL function "acs_object__delete" line 37 at EXECUTE statement
SQL statement "SELECT acs_object__delete (
delete__package_id
)"
PL/pgSQL function "apm_package__delete" line 32 at PERFORM

SQL:
select apm_package__delete('342695');

[16/Nov/2016:18:57:33][27065.b45ecb70][-conn:iurix:0-] Warning: propagating abortion from /var/www/iurix/packages/acs-subsite/www/admin/site-map/instance-delete.tcl (status 500): 'Error Deleting Instance')
[16/Nov/2016:18:57:52][27065.b1decb70][-sched:8-] Notice: Running ad_proc load_mails -queue_dir /home/iurix/Maildir
[16/Nov/2016:18:57:52][27065.b1decb70][-sched:8-] Notice: I passed

Collapse
2: Re: Deleting PKG (response to 1)
Posted by Iuri Sampaio on
After I removed object 42695 I was able to remove 342776 .

I don't know the reason the first was still there. I had deleted following the very same process I did to delete the second.

Best wishes