Forum .LRN Q&A: Can't add users to dotlrn on Postgres 7.1.3

Hello,

I was delighted to have been able to install dotlrn sucessfully - minus the static portlet module. However, when I got to adding myself (the site-wide admin) to dotlrn - I got this request error.

Excerpt Follows -------------

Database operation "dml" failed
    while executing
"ns_pg_bind dml nsdb0 {
            update acs_objects
            set security_inherit_p = 'f'
            where object_id = :object_id
        }"
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    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 db {
            db_exec dml $db $full_statement_name $sql
        }"
    (procedure "db_dml" line 37)

---------------------------------------------

Am trying to pin point where it occurs. Maybe someone has encountered this before.

I using the latest checkout from dotlrn and Postgres 7.1.3.

Regards,

Collapse
Posted by Tracy Adams on
The error is caused because the check to see if the user is a site-wide-admin assumes the user is a dotlrn user. As a quick fix, delete the following block of code from /packages/dotlrn/www/admin/user.adp:
<if @site_wide_admin_p@ eq t> This user is a site-wide admin. (<a href="site-wide-admin-toggle?user_id=@user_id@ &value=revoke&referer=@return_url@">revoke) </if> <else> <a href="site-wide-admin-toggle?user_id=@user_id@&value=grant&referer=@return_url@">Make this user a site wide admin.</a> </else>
I haven't had time to work out a more complete fix and we are able to make dotlrn users via the dotlrn admin page. This will allow you to continue....
Collapse
Posted by Hamilton Chua on
Thanks for responding so quickly Tracy.

However, I could not find the code you pointed out in user.adp.

I also tried adding a user from the admin but I get the same error above. It seems one of the procs being called in user-new-2 is responsible.

Collapse
Posted by Hamilton Chua on
Here's an excerpt of my log file
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Notice: Querying 
' 
            update acs_objects 
            set security_inherit_p = 'f' 
            where object_id = '5679';' 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Error: Ns_PgExec: 
result status: 7 message: ERROR:  triggered data change violation on 
relation "acs_object_context_index" 
 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Error: dbinit: 
error(localhost::dotlrn,ERROR:  triggered data change violation on 
relation "acs_object_context_index" 
): ' 
            update acs_objects 
            set security_inherit_p = 'f' 
            where object_id = '5679' 
        ' 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Notice: Querying 
'abort transaction;' 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Notice: Ns_PgExec: 
Rolling back transaction 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Notice: dbinit: 
sql(localhost::dotlrn): 'abort transaction' 
[31/Jul/2002:17:50:50][29816.324613][-conn14-] Notice: RP (680.789 
ms): error in rp_handler: serving POST /dotlrn/admin/user-new-2 
 
 
Collapse
Posted by Tracy Adams on
You are correct, my post didn't fix your problem.  I saw that you were gaving trouble "adding myself (the site-wide admin) to dotlrn" and that was the exact trouble I had and thought I could quickly help out.  I checked the latest source (we merge from core about once a week) and the code I posted was not there. So all looks well with my problem :)
Collapse
Posted by Hamilton Chua on
Hahahahahaha .... that's a good one. Nevertheless, thanks very much for sharing .... :)