Simple answer: .LRN sucks. More correct answer:
.LRN makes use of the NSV Array directly. I fixed the issues during startup, but the fact remains that .LRN has rewritten site nodes in dotlrn/tcl/site-nodes-procs. These procedures should not be in the .LRN package in the first place. But they are there and I don't have the time (neither the client the budget as he isnt using .LRN) to fix this at the moment.
Here is the fix for .LRN initialization
===================================================================
RCS file: /cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v
retrieving revision 1.20
diff -r1.20 applets-procs.tcl
38c38
< if {[nsv_exists site_nodes "[get_url]/"]} {
---
if {[site_node::get_node_id -url "[get_url]/"] ne ""} {
Index: tcl/dotlrn-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v
retrieving revision 1.75
diff -r1.75 dotlrn-procs.tcl
108d107
< FIXME: refactor
110,122c109,115
< set dotlrn_ancestor_p 0
< set package_list [nsv_array get site_nodes "[get_url]/${package_key}*"]
<
< for {set i 1} {$i < [llength $package_list]} {incr i 2} {
< array set package_info [lindex $package_list $i]
<
< if {[site_node_closest_ancestor_package -default 0 -url $package_info(url) [package_key]] != 0} {
< set dotlrn_ancestor_p 1
< break
< }
< }
<
< return $dotlrn_ancestor_p
---
set site_node [site_node::get_node_id -url "[get_url]/${package_key}/"]
if {$site_node eq ""} {
return 0
} else {
return 1
}