Forum .LRN Q&A: Error when adding new department and new community

I got this error when trying to add a new community:
Selection did not return a value, and no default was provided
    while executing
"db_string select_node_id {}"
    (procedure "get_type_node_id" line 2)
    invoked from within
"get_type_node_id $community_type"
    invoked from within
"if {[empty_string_p $parent_community_id]} {
                set parent_node_id [get_type_node_id $community_type]
            } else {
              ..."
    ("uplevel" body line 33)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 1)
    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 25)
    invoked from within
"dotlrn_community::new  -community_type [community_type]  -
object_type [community_type]  -pretty_name $pretty_name  -description 
$description  -parent_..."
    (procedure "dotlrn_club::new" line 6)
    invoked from within
"dotlrn_club::new  -description $description  -pretty_name 
$pretty_name  -join_policy $join_policy"
    invoked from within
"if {[form is_valid add_club]} {
    form get_values add_club  pretty_name description join_policy referer

    set key [dotlrn_club::new  -description..."
    ("uplevel" body line 41)
    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 modi..."
    
(procedure "code::tcl::/web/eschool/packages/dotlrn/www/admin/club-
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 7)
    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([ad_conn url]) [ad_conn path_inf..."

and the following error when trying to add a new department:
Selection did not return a value, and no default was provided
    while executing
"db_string select_node_id {}"
    (procedure "get_type_node_id" line 2)
    invoked from within
"get_type_node_id $parent_type"
    (procedure "dotlrn_community::new_type" line 4)
    invoked from within
"dotlrn_community::new_type  -
community_type_key "$department_key"  -
parent_type "dotlrn_class_instance"  -pretty_name $pretty_name  -
description $desc..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 39)
    invoked from within
"db_transaction {
            dotlrn_community::new_type  -
community_type_key "$department_key"  -
parent_type "dotlrn_class_instance"  -pretty_name $pr..."
    (procedure "dotlrn_department::new" line 13)
    invoked from within
"dotlrn_department::new  -pretty_name $pretty_name  -description 
$description  -external_url $external_url"
    invoked from within
"if {[form is_valid add_department]} {
    form get_values add_department  pretty_name description 
external_url referer

    set department_key [dotlrn..."
    ("uplevel" body line 44)
    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 modi..."
    
(procedure "code::tcl::/web/eschool/packages/dotlrn/www/admin/depar
tment..." 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 7)
    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([ad_conn url]) [ad_conn path_inf..."

Nevermind! My dotLRN installation was incompleted. I droped the database and reinstall. Everything's OK now.
I'm dealing with exactly the same issue but can't find solution for it.
What do you mean by "incompleted installation" ?
What cvs version did you used to get it working ?
Collapse
Posted by Ben Koot on
Starting from scratch often helps, and if your system is empty, it's easier than trying to find the root of all evil.

keep smiling

Ben

I think it's best if you try to start from scratch and install using the install.xml file.

In packages/dotlrn you will find an install.xml file.

Put this in your openacs root folder and try to reinstall.

"Incompleted installation" meaning that something went wrong during installation, so the installation script did not get executed all the way to the end. I don't remember what cvs version I used, it's been quite a while since I worked on it.

I would recommend that you get the latest stable version, and try starting from scratch.