Forum .LRN Q&A: An error occured while trying to add a user to a community.

When I try to add a user to a community I get the following error. Does anyone know what the problem is?

I´ve trying to install dotlrn into Centos 5, aolserver 4.0.10 and postgres sql 8.2

thanks in advance

[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: Ns_PgExec: result status: 7 message: ERROR: function __exec_115_approve() does not exist

[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: Ns_PgExec: result status: 7 message: ERROR: current transaction is aborted, commands ignored until end of transaction block

[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: register.tcl failed: Transaction aborted: Database operation "dml" failed (exception ERROR, "ERROR: current transaction is aborted, commands ignored until end of transaction block
")

ERROR: current transaction is aborted, commands ignored until end of transaction block

SQL:

update acs_objects set modifying_user = '568' where object_id = '8376'

Database operation "dml" failed (exception ERROR, "ERROR: current transaction is aborted, commands ignored until end of transaction block
")

ERROR: current transaction is aborted, commands ignored until end of transaction block

SQL:

update acs_objects set modifying_user = '568' where object_id = '8376'


while executing
"ns_pg_bind dml nsdb0 {

update acs_objects set modifying_user = :user_id where object_id = :rel_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_modifying_user {}"
("uplevel" body line 43)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {

# We need the id of the user that we are changing state for
set rel_user_id [db_string select_rel_user_id { ..."
(procedure "change_state" line 3)
invoked from within
"change_state -rel_id $rel_id -state "approved""
(procedure "membership_rel::approve" line 3)
invoked from within
"membership_rel::approve -rel_id $rel_id"
("uplevel" body line 2)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {
membership_rel::approve -rel_id $rel_id

applets_dispatch -community_id $community_id -op AddUserToCommunit..."
(procedure "membership_approve" line 5)
invoked from within
"membership_approve -user_id $user_id -community_id $community_id"
invoked from within
"if {[string equal $member_state approved]} {
membership_approve -user_id $user_id -community_id $community_id
}"
("uplevel" body line 23)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {
# Create the form
if {[empty_string_p $extra_vars]} {
set extra_vars [ns_set create]
..."
(procedure "dotlrn_community::add_user_to_community" line 9)
invoked from within
"dotlrn_community::add_user_to_community -rel_type $rel_type -extra_vars $extra_vars -community_id $community_id -user_id $user_id -member_state $..."
(procedure "dotlrn_class::add_user" line 10)
invoked from within
"dotlrn_class::add_user -rel_type $rel_type -community_id $community_id -user_id $user_id -member_state $member_state"
(procedure "dotlrn_community::add_user" line 9)
invoked from within
"dotlrn_community::add_user -member_state approved $community_id $user_id"
("open" arm line 2)
invoked from within
"switch -exact $join_policy {
"open" {
dotlrn_community::add_user -member_state approved $community_id $user_id
}
"..."
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Warning: blank-compat: /var/www/dotlrn-2.3.1/packages/dotlrn/www/register.tcl uses deprecated property title instead of doc(title).
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Warning: blank-compat: /var/www/dotlrn-2.3.1/packages/dotlrn/www/register.tcl uses deprecated property header_stuff instead of head.
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Warning: propagating abortion from /var/www/dotlrn-2.3.1/packages/dotlrn/www/register.tcl (status 500): 'Error adding user to community')
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Warning: propagating abortion from /var/www/dotlrn-2.3.1/packages/acs-tcl/lib/page-error.tcl (status 500): 'Error adding user to community')
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: rp_report_error: Error rendering error page (!)
ADP_ABORT
while executing
"error ADP_ABORT "
(procedure "adp_abort" line 2)
invoked from within
"adp_abort"
invoked from within
"if [info exists request_aborted] {
ns_log warning "propagating abortion from $__adp_remember_stub.tcl (status [lindex $request_aborted 0]): '[lindex ..."
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"
invoked from within
"template::adp_parse /var/www/dotlrn-2.3.1/packages/acs-tcl/lib/page-error {stacktrace ADP_ABORT\n\ \ \ \ while\ executing\n\"error\ ADP_ABORT\ \"\n\ \..."
("uplevel" body line 1)
invoked from within
"uplevel [list template::adp_parse [template::util::url_to_file $template [ad_conn file]] $template_params"
(procedure "ad_parse_template" line 15)
invoked from within
"ad_parse_template -params $params "/packages/acs-tcl/lib/page-error""
invoked from within
"set rendered_page [ad_parse_template -params $params "/packages/acs-tcl/lib/page-error"]"
("uplevel" body line 2)
invoked from within
"uplevel $body "
[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: GET http://172.16.27.215/dotlrn/register?community%5fid=8026&referer=%2fdotlrn%2fmanage%2dmemberships%3fnon%255fmember%255fterm%255fid%3d%252d1%26non%255fmember%255fdepartment%255fkey%3d%26member%255fterm%255fid%3d%252d1%26member%255fdepartment%255fkey%3d
referred by "http://172.16.27.215/dotlrn/manage-memberships";
ADP_ABORT
while executing
"error ADP_ABORT "
(procedure "adp_abort" line 2)
invoked from within
"adp_abort"
invoked from within
"if [info exists request_aborted] {
ns_log warning "propagating abortion from $__adp_remember_stub.tcl (status [lindex $request_aborted 0]): '[lindex ..."
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"
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..."

Can it be hat you are trying to add the same user, that you have tried to delete before?

deleting users is not supported in dotlrn. One can ban etc. users, but deleting is quite hard due to the traces in the system (e.g. do you want to delete the forums entries that the user wrote? and the replies to it, etc.)

it would help if you explain step by step what leads to the problem (and submit a bug report to the tracker).

Hi Gustaf,

Step by step:

1.- login into dotlrn with a user with permission of superadministrator.
2.- I clicked on "Join/drop a class or community group"
3.- I click on join button of the community in that I want to join.
4.- Appears the error

thanks in advance.

the first line whch is

[08/oct/2008:02:44:40][29778.3068611472][-conn:dotlrn-2.3.1::4] Error: Ns_PgExec: result status: 7 message: ERROR: function __exec_115_approve() does not exist

provides the best clue to what's going on... so there are a few possibilities:

  • the function named __exec_115_approve is the function which is being called (that is, the name is correct) and it simply doesn't exist. in this case the message describes directly this situation.
  • the function named __exec_115_approve is the right name but it's being called with the wrong number and/or types of arguments, and is therefore being rejected by the engine
  • the function being called is of a name that is being pieced together into a string which is used to call it, but part of the "calculation" of the name of the function to call, didn't go well.
  • ... (there are some other possibilities along the lines
    of the above)

Maybe a more experienced openacs/dotlrn dev could comment?

additionally, there are some warnings and errors that have to do with which master pages you're using