Forum .LRN Q&A: Re: notes on upgrading dotLRN to 2.2.0a1

Collapse
Posted by Nima Mazloumi on
I used the correct function in the create.sql of acs-kernel. Now I can access the communities. But when I try to create a new subgroup or community I get the following exception:

Database operation "dml" failed (exception ERROR, "FEHLER: Einfügen oder Aktualisieren in Tabelle »acs_objects« verletzt Fremdschlüssel-Constraint »acs_objects_package_id_fk«
DETAIL: Schlüssel (package_id)=(0) ist nicht in Tabelle »apm_packages« vorhanden.
")

FEHLER: Einfügen oder Aktualisieren in Tabelle »acs_objects« verletzt Fremdschlüssel-Constraint »acs_objects_package_id_fk«
DETAIL: Schlüssel (package_id)=(0) ist nicht in Tabelle »apm_packages« vorhanden.

SQL:
update acs_objects
set package_id = '0'
where object_id = '3355574'

while executing
"ns_pg_bind dml nsdb0 {
update acs_objects
set package_id = :object_id
where object_id = :node_id
}"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec dml $db $full_statement_name $sql"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
db_exec dml $db $full_statement_name $sql
}"
(procedure "db_dml" line 100)
invoked from within
"db_dml update_object_package_id {}"
(procedure "site_node::mount" line 4)
invoked from within
"site_node::mount -node_id $attachments_node_id -object_id [apm_package_id_from_key attachments]"
(procedure "dotlrn_forums::add_applet_to_community" line 14)
invoked from within
"dotlrn_forums::add_applet_to_community $community_id"
(procedure "AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_forums" line 1)
invoked from within
"AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_forums 3355385"
("uplevel" body line 1)
invoked from within
"uplevel $func_and_args"
(procedure "apply" line 3)
invoked from within
"apply $proc_name $arguments"
(procedure "acs_sc_call" line 6)
invoked from within
"acs_sc_call dotlrn_applet $op $list_args $applet_key"
(procedure "applet_call" line 2)
invoked from within
"applet_call $applet_key AddAppletToCommunity [list $community_id]"
invoked from within
"set package_id [applet_call $applet_key AddAppletToCommunity [list $community_id]]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 1)
invoked from within
"db_transaction {
set package_id [applet_call $applet_key AddAppletToCommunity [list $community_id]]

register_a..."
(procedure "dotlrn_community::add_applet_to_community" line 2)
invoked from within
"dotlrn_community::add_applet_to_community $community_id $applet_key"
("foreach" body line 3)
invoked from within
"foreach applet_key $default_applets_list {
if {[dotlrn_applet::applet_exists_p -applet_key $applet_key]} {
dotlrn_..."
("uplevel" body line 68)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {
set user_id [ad_conn user_id]
set community_id [package_instantiate_object -extra_vars $extra_vars $object_ty..."
(procedure "dotlrn_community::new" line 26)
invoked from within
"dotlrn_community::new -parent_community_id $parent_community_id -description $description -community_type dotlrn_community -pretty_name $pretty_na..."
invoked from within
"set subcomm_id [dotlrn_community::new -parent_community_id $parent_community_id -description $description -community_type dotlrn_community -pretty..."
("uplevel" body line 2)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {
set subcomm_id [dotlrn_community::new -parent_community_id $parent_community_id -description $description -community_type ..."
invoked from within
"if {[form is_valid add_subcomm]} {
form get_values add_subcomm pretty_name description join_policy referer

# we set some extra vars based on..."
("uplevel" body line 57)
invoked from within
"uplevel {
#
# Copyright (C) 2001, 2002 MIT
#
# This file is part of dotLRN.
#
# dotLRN is free software; you can redistribute it and/or modify it u..."
(procedure "code::tcl::/www/unima0/packages/dotlrn/www/subcommunity-new" line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."