Forum .LRN Q&A: Site corrupted after installing services

Collapse
Posted by Al Guyer on
'ello again,

Have another big time problem. After installing 3 services, the site now
fails to start. Since I am in a test phase, to see what dotlrn can do, I was
not paying attention at what the three services were. I tried to find in the
error.log what I actually tried to install but did not find any record.

Here's the particulars of my system.

aolserver:

README: AOLserver

This is the AOLserver 4.0.8 source distribution. AOLserver is
available at http://aolserver.com, a SourceForge hosted site.

RCS: @(#) $Id: README,v 1.4.2.1 2004/09/07 17:27:26 dossy Exp $

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

openACS:
This is the OpenACS - the Open Architecture Community System.

Version 5.1.4
--------------------------------------------------------------------

dotlrn:
https://openacs.org/projects/dotlrn/download/download/dotlrn-2.1.1.tar.gz?revision_id=248613

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

postgres:
dev-db/postgresql-7.3.10

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

kernel:
# uname -a
Linux miigf 2.6.12-gentoo-r10 #5 SMP Wed Oct 26 20:07:32 PDT 2005 i686
Intel(R) Pentium(R) 4 CPU 3.40GHz GenuineIntel GNU/Linux

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

distro:
gentoo!

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

Actually, it doesn't fail to start, per se, in that there does not
appear to be a fail reported in the log file, until I connect to
the site:
http://localhost

the site navigates, and dies at:
http://localhost/register/?return%5furl=%2fdotlrn%2findex

My "new" site reports:
Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: Attribute "hidden_p" not found

SQL:
select pretty_name,
sort_key
from portal_pages
where portal_id = NULL
and hidden_p = 'f'
order by sort_key

while executing
"ns_pg_bind select nsdb0 {
select pretty_name,
sort_key
from portal_pages
where portal_id = :por..."
("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 select $db $full_statement_name $sql"
invoked from within
"set selection [db_exec select $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 {
set selection [db_exec select $db $full_statement_name $sql]

set counter 0
while { [db_getrow $..."
(procedure "db_foreach" line 36)
invoked from within
"db_foreach list_page_nums_select {} {
if { ("$dotlrn_url/" == [ad_conn url] || "$dotlrn_url/index" == [ad_conn url]) && $sort_key == 0 && $page_n..."
(procedure "dotlrn::portal_navbar" line 79)
invoked from within
"dotlrn::portal_navbar -user_id $user_id -link_control_panel $link_control_panel -control_panel_text $control_panel_text -pre_html
"$extra_spaces" ..."
invoked from within
"if { $make_navbar_p } {
if {$link_control_panel} {
set link_control_panel 1
} else {
set link_control_panel 0
}
set extra_spaces "[LESS_THAN_SIGN--removed_to_post]i..."
("uplevel" body line 283)
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..."
(procedure "code::tcl::/var/www/oacs/packages/dotlrn/www/dotlrn-master" 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 $__adp_master [concat [list __adp_slave $__adp_output] [array get __adp_properties]]"
(procedure "template::adp_parse" line 73)
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..."

Collapse
Posted by Dave Bauer on
Looks like your Tcl library and data model are out of synch.

http://cvs.openacs.org/cvs/openacs-4/packages/dotlrn/tcl/navigation-procs.xql?rev=1.1.2.2&view=markup

That shows where the hidden_p attribute was added to that query.

It appears to be part for dotlrn 2.1.3 final.

The portal pages table is created in

http://cvs.openacs.org/cvs/openacs-4/packages/new-portal/sql/postgresql/portal-core-create.sql?rev=1.4.10.1&view=markup

And dotlrn 2.1.3 final version should include that column.

It appears there is no upgrade script from versions prior to the new-portal package that goes with dotlrn prior to 2.1.3.

Something like this

alter table portal_pages add hidden_p char(1);
alter table portal_pages alter hidden_p set default 'f';
update portal_pages set hidden_p='f';
alter table portal_pages alter hidden_p set not null;
alter table portal_pages add constraint portal_pages_hidden_p_ck check (hidden_p in ('t','f'));
Collapse
Posted by Al Guyer on
Hello Dave,

Thanks for your reply. I am afraid you are WAY over my head. I can see your shoe laces from here... I haven't, yet, got my head around how all the pieces fit. I am still looking at the bootloader... :)

It sounds like what your are saying is, if I go back to dotlrn 2.1.3, I won't get this error when I load up what ever service I loaded...?

So, it sounds like not all apps & services work with all versions of dotLrn/OpenACS? Is there a compatiblity matrix for the assorted apps/services -vs- versions of openACS. And if I am not mistaken, not all apps/services peacefully co-exist with all apps/services?

Thanks for your help,

-al

Collapse
Posted by Dave Bauer on
If you checkout a release tag frm CVS or download the release tarball (although I guess we alredy found bugs in that..) You should be fine.

If you try to upgrade one package, it looks like something is broken in a more recent dotlrn.

What version of dotlrn is in packages/dotlrn/dotlrn.info currently?

The APM should not let you install incompatible versions but in this case it thinks its compatible, but there is a bug.

Collapse
Posted by Al Guyer on
?xml version="1.0"?>
!-- Generated by the OpenACS Package Manager -->

package key="dotlrn" url="https://openacs.org/repository/apm/packages/dotlrn"; ty
pe="apm_application">
package-name>dotLRN /package-name>
pretty-plural>dotLRN /pretty-plural>
initial-install-p>f /initial-install-p>
singleton-p>f /singleton-p>

version name="2.1.1" url="https://openacs.org/repository/download/apm/dotlrn
-2.1.1">