Forum .LRN Q&A: Problems with dotLRN 2.2.0 upgrade

Collapse
Posted by Matthew Coupe on
After upgrading our dotLRN 2.1.1 and OpenACS 5.1.5 implementation to dotLRN 2.2.0 and OpenACS 5.2.3 we keep getting the same error message cropping up. I initially thought ti had something to do with xotcl but we've been informed that is not the source. If anyone is famliair with this error or has any idea what is causing it then I'd appreciate some advise.

Perhaps it is because we upgraded straight from 2.1.1 to 2.2.0 and skipped 2.1.3??

Here's the error, cheers. It occurs when we try to create a new class, create a new assignment etc.

bad variable name "af_to_sql(add_class_instance__active_start_date)": upvar won't create a scalar variable that looks like an array element
while executing
"global $name"
("to_sql" arm line 10)
invoked from within
"switch $flag {

key {
if { [info exists af_key_name($form_name)] } {
return -c..."
(procedure "ad_form" line 261)
invoked from within
"ad_form -name add_class_instance -form {

{term:integer(select)
{label "Term"}
{options $term_options}
{help_text "[_ dotlrn.Term_help..."
("uplevel" body line 35)
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 it u..."
(procedure "code::tcl::/var/lib/aolserver/acsupgrade/packages/dotlrn/..." 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 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 Matthew Coupe on
I just carried out a clean install of dotLRN version 2.2.0 and this same bug is present again when creating a new class. Therefore it must be a problem with the 'stable' release or our setup is not compatible with something.

We are on Red Hat ES 4, AOLServer 4, Postgresql 7.4. Perhaps one of these needs upgrading.

Thanks in advance.

Collapse
Posted by Emmanuelle Raffenne on
Matthew,

Perhaps it is because we upgraded straight from 2.1.1 to 2.2.0 and skipped 2.1.3??

Upgrade from 2.1.1 to 2.2.0 has not been tested.

I've just tried a clean install of dotlrn 2.2.0 tarball (https://openacs.org/projects/dotlrn/download/one-revision?revision_id=468768) on aolserver 4.0.10 + pg 7.4.7. I'm not able to reproduce the error you got when creating classes or assessments.

Collapse
Posted by Matthew Coupe on
Cheers for the response Emmanuelle,

That's the version I downloaded. I'll try again tomorrow but I definitely cannot create a class or community and get the error in both instances. In the clean install I don't have any classes and so can't try doing any assessments or such. the only thing I didn't install was xotcl as I had problems with that installation. Would this make a difference?

Here's the error for good measure. Any ideas what it could be referring to? A bad proc? db error? I'm not too hot on error reporting.

Cheers

bad variable name "af_to_sql(add_class_instance__active_start_date)": upvar won't create a scalar variable that looks like an array element
while executing
"global $name"
("to_sql" arm line 10)
invoked from within
"switch $flag {

key {
if { [info exists af_key_name($form_name)] } {
return -c..."
(procedure "ad_form" line 261)
invoked from within
"ad_form -name add_class_instance -form {
{term:integer(select)
{label "Term"}
{options $term_options}
{help_text "[_ dotlrn.Term_help..."
("uplevel" body line 35)
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::/var/lib/aolserver/dotlrn220/packages/dotlrn/w..." 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 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 Emmanuelle Raffenne on
AFAIK, xotcl is only needed for chat package.

Sorry Matthew but I have no idea of what causes that error when creating a class.

Collapse
Posted by Dave Bauer on
The error you are reporting is very strange, it does not appear to be related to an upgrade at all.

What version of tcl are you using?

What is the URL of the page where you receive this error?

Collapse
Posted by Matthew Coupe on
I just tried downgrading to a none alpha version of tcl, 8.4.7. Still getting the same error so it's not that!
Collapse
Posted by Matthew Coupe on
I just did the same install for the second time and exactly the same behaviour has cropped up again. The only thing I can think of is that xotcl is a core package and it won't work without it, but why the errors with the form handler? I don't understand it at all.
Collapse
Posted by Matthew Coupe on
These are the packages installed that are creating the af_to_sql error.
acs-admin Site-Wide Administration 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-api-browser API Browser 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-authentication Authentication 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-automated-testing Automated Testing 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-bootstrap-installer Bootstrap Installer 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-content-repository Content Repository 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-core-docs Documentation 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-datetime Date and Time Utilities 5.2.2 Enabled Locally view files | watch all files | reload changed
acs-events ACS Events 0.5 Enabled Locally view files | watch all files | reload changed
acs-kernel Kernel 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-lang Localization 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-mail Mail 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-mail-lite ACS Mail Lite 1.1 Enabled Locally view files | watch all files | reload changed
acs-messaging Messaging 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-reference ACS Reference Data 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-service-contract Service Contracts 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-subsite Subsite 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-tcl Tcl Library 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-templating Templating 5.2.3 Enabled Locally view files | watch all files | reload changed
acs-translations ACS Translation Storage 5.2.3 Enabled Locally view files | watch all files | reload changed
assessment Assessment 0.20 Enabled Locally view files | watch all files | reload changed
assessment-portlet Assessment Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
attachments Attachments 0.10 Enabled Locally view files | watch all files | reload changed
bm-portlet Bulk Mail Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
bulk-mail Bulk Mail 0.5.1d7 Enabled Locally view files | watch all files | reload changed
calendar Calendar 2.1.0b5 Enabled Locally view files | watch all files | reload changed
calendar-portlet Calendar Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
categories Categories 1.1 Enabled Locally view files | watch all files | reload changed
dotlrn dotLRN 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-assessment dotLRN Assessment Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-bm dotLRN Bulk Mail Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-calendar dotLRN Calendar Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-dotlrn dotLRN Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-evaluation dotLRN Evaluation Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-faq dotLRN FAQ Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-forums dotLRN Forums Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-fs dotLRN File Storage Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-homework dotLRN Homework 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-news dotLRN News Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-portlet dotLRN Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
dotlrn-static dotLRN Static Applet 2.2.0 Enabled Locally view files | watch all files | reload changed
evaluation Evaluation 2.0.3d2 Enabled Locally view files | watch all files | reload changed
evaluation-portlet Evaluation Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
faq FAQ 5.2.0d4 Enabled Locally view files | watch all files | reload changed
faq-portlet FAQ Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
file-storage File Storage 5.2.3 Enabled Locally view files | watch all files | reload changed
forums Forums 1.3d1 Enabled Locally view files | watch all files | reload changed
forums-portlet Forums Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
fs-portlet File Storage Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
general-comments General Comments 5.2.0 Enabled Locally view files | watch all files | reload changed
new-portal New Portal 2.2.0 Enabled Locally view files | watch all files | reload changed
news News 5.2.0d6 Enabled Locally view files | watch all files | reload changed
news-portlet News Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
notifications Notifications 5.2.0 Enabled Locally view files | watch all files | reload changed
oacs-dav webDAV Support 1.1b1 Enabled Locally view files | watch all files | reload changed
profile-provider Profile Provider 2.1.2 Enabled Locally view files | watch all files | reload changed
ref-timezones Reference Data - Timezone 5.2.3 Enabled Locally view files | watch all files | reload changed
rss-support RSS Support 0.3 Enabled Locally view files | watch all files | reload changed
search Search 5.2.3 Enabled Locally view files | watch all files | reload changed
static-portlet Static Portlet 2.2.0 Enabled Locally view files | watch all files | reload changed
theme-selva Selva Theme 2.2.0 Enabled Locally view files | watch all files | reload changed
user-profile User Profile 2.1.2 Enabled Locally view files | watch all files | reload changed
Collapse
Posted by Matthew Coupe on
Ok, I'm convinced that there is absolutely no way the download of dotLRN 2.2.0 from the URL https://openacs.org/projects/dotlrn/download/ works as is and without any kind of modification on Aolserver 4.0.10, postgresql 7.4.7 and Red Hat ES 4.0. I really want someone to prove me wrong!!!

I have now tried to do a clean install of this version on 2 different servers, both providing the same errors. I have also tried direct upgrades from dotLRN 2.1.1 to 2.2.0 and also this morning from a clean install of dotLRN 2.1.3 (from the download page - works a dream) to 2.2.0.

If anyone out there has managed to download this tarball as is from the download page (not cvs), install and run it and then administer classes, communities and users without enountering any problems whatsoever then I'd really like to know how!

I'm at a complete loss at how I can upgrade or even use this latest version as it does not want to work. Surely this was tested as a clean install? how can I be the only one with these problems when I can successfully run 2.1.1 and 2.1.3 without any problems? Does OpenACS 5.2.3 have additional requirements that I may have missed?

Thanks so much for any help, this is really driving me up the wall!

Collapse
Posted by Dave Bauer on
There is more than one installation using dotlrn 2.2 upgraded and so far no one else has reported this error.

The way ad_form works, entirely in Tcl, it does not seem that it should be affected by an upgrade, which mainly would should a probem in the database code.

I can't test on FC4 but I'll try a new install of dotlrn 2.2 from the tarball and see what I find.

Collapse
Posted by Gustaf Neumann on
Matthew,

this has nothing to do with XOTcl. I am rather astonished that you think it could.

The error message is triggered from /openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl,
where the following leads to problems (simplified):

> tclsh8.5
% proc x {} {global af_to_sql(add_class_instance__active_start_date)}
%x
bad variable name "af_to_sql(add_class_instance__active_start_date)": upvar won't create a scalar variable that looks like an array element


> tclsh8.4
% proc x {} {global af_to_sql(add_class_instance__active_start_date)}
% x
%

The proc "works" in tcl 8.4 but not tcl 8.5.
This means as well that you are still using tcl 8.5a* on your server.

I am not sure, what the intended semantics are, if one tries to set an **element** of an array global. At the place in the form-processing-procs, this is not necessary. Replace
"global $name" by "global af_$flag". The code is still not pretty, but at least, it should stop choking.

Please test it, i can commit the change in case it works.
However, there might be some other occurrences, where tcl 8.5 deviates from 8.4. To be on the safe side i would recommend to use tcl 8.4.13.

-gustaf

Collapse
Posted by Dave Bauer on
Thanks Gustaf! Great detective work.
Collapse
Posted by Matthew Coupe on
Gustaf, you are my hero.

However, I'm not sure that my tclsh had been upgraded on the aolserver as well as at server level. I installed tclsh 8.4.13 on the server and checked it with info patchlevel, this returned 8.4.13.

I restarted my server just to make sure that it would behave differently and brought up the dotLRN instance. When I browsed to the same new-class page I got the same error as before.

It was only when I made the proc change you mentioned that I was able to get past that error and create a class.

Would I now need to recompile aolserver using the new version of tclsh or should it pick it up the changes automatically?

On the xotcl front, my reasoning was that after installing OpenACS 5.2.3 my eror log had messages like the following:

Error: during '::xotcl::Object instproc'
during '::xotcl::Object instproc'
::xotcl::Object ::xotcl::Object->configure
invoked from within
"::xotcl::Object configure \
-instproc contains {{-withnew:boolean true} -object {-class ::xotcl::Object} cmds} {
if {![info exists object]} {set obje..."

I'll be able to elaborate further when I get into the nitty gritty of merging and testing the upgrade. If you know about the aolserver problem or how I can test out the version being used by aolserver that would be great.

Cheers,
Matthew

Collapse
Posted by Gustaf Neumann on
matthew,

Installing a different version of tcl and having an appropriate tclsh around is not enough. You have to recompile the aolserver. Do a "make clean" in the aolserver source directory and run "configure --with-tcl=...." pointing the the correct tcl tree. After that, you have to recompile the aolserver modules (ns_cache, ....) as well.

Concerinjg the xotcl error message: it says only that an error occured during an instproc definition, but not, what the error is.

-gustaf

Collapse
Posted by Talal Hammudeh on
actually, and for sorry , I have the same problem,
i tried
postgresql 7.4.17
AOL 4.10
ACS 5.2.3
and dotlrn 2.2.0
from fresh installation but still have errors
as file not found and so on..
although that all packages are installaed and available.