Forum OpenACS Development: Re: 5.0 upgrade experience

Collapse
Posted by Carl Robert Blesius on

I put some time aside this weekend to do the 4.6.3 -> 5.0.0 upgrade on my peronal site. I got pretty far (note to anyone else atempting this: look at and use the script -> upgrade with documentation alone does not work at all).

Was able to get through a lot of errors, but not this one: When I try to login (step 8: If you can login, visit /acs-admin/apm and upgrade acs-kernel and acs-service-contract and uncheck the data model scripts) I get a request error and this is was the error.log says:

[21/Mar/2004:09:04:39][30040.5126][-conn2-] Error: GET http://blesius.org/register/?return%5furl=%2f
referred by "http://blesius.org/"
no value given for parameter "key" to "_"
    while executing
"_ acs-subsite.Log_In"
    invoked from within
"list [_ acs-subsite.Log_In] ok"
    invoked from within
"list [list [_ acs-subsite.Log_In] ok]"
    invoked from within
"set login_button [list [list [_ acs-subsite.Log_In] ok]]"
    ("uplevel" body line 77)
    invoked from within
"uplevel {
          # Present a login box
#
# Expects:
#   subsite_id - optional, defaults to nearest subsite
#   return_url - optional, defaults to Your..."
    (procedure "code::tcl::/web/crb/packages/acs-subsite/lib/login" 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 [template::util::url_to_file "/packages/acs-subsite/lib/login" "$__adp_stub"] [list return_url "${return_url}" no_frame_p "1" auth..."
    invoked from within
"append __adp_output [template::adp_parse [template::util::url_to_file "/packages/acs-subsite/lib/login" "$__adp_stub"] [list return_url "${return_url}..."
    ("uplevel" body line 17)
    invoked from within
"uplevel {
          set __adp_output ""

    set __adp_master [template::util::url_to_file "[ad_parameter -package_id [ad_conn subsite_id] DefaultMaster ..."
    (procedure "template::code::adp::/web/crb/packages/acs-subsite/www/regis..." line 2)
    invoked from within
"template::code::${template_extension}::$__adp_stub"
    (procedure "template::adp_parse" line 68)
    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..."

Suggestions?

Collapse
Posted by Malte Sussdorff on
This looks like an acs-lang problem. Visit http://yoursite.com/acs-lang/admin/load-catalog-files before loging in for the first time to load the keys.
Collapse
Posted by Carl Robert Blesius on

It is hard to visit /acs-lang/admin/load-catalog-files when I can not login.

I already tried what Robert mentioned above (loading /foo.tcl with lang::catalog::import -locales [list "en_US"] in it).

Just to make sure I removed the "-locales [list "en_US"]" part so it more closely resembles /acs-lang/admin/load-catalog-files and tried it again. No luck, same error on registration.

Collapse
Posted by Jeff Davis on
you could do something like this
rename _ original_
proc _ {{key {}}} {
  if {[string is space $key]} { 
     return NULL_KEY
  }
  return [original_ $key]
}
in a file like SERVERROOT/tcl/zz-hack.tcl. That should allow you to at least log in.
Collapse
Posted by Jeff Davis on
actually, I guess you would have to handle the substitution variables as well (I should have looked at the proc before I
wrote that I guess).
Collapse
Posted by Malte Sussdorff on
I know this is a horible security risk, but find out your user_id and login using a page which uses "ad_user_login -forever=0 $user_id" to log you into the system. Maybe this can help your loging in problem.
Collapse
Posted by Carl Robert Blesius on

Thanks, but I aborted the upgrade and restored from backups.

Going to put the two postgres versions up on different ports in parallel so I can tool with it as I have time.

Here is an improved script from Jeff (for posterity)

rename _ original_
proc _ {{key {}} {vars {}}} {
  if {[string is space $key]} {
    return NULL_KEY
  }
    return [uplevel [list original_ $key $vars]]
}

Round two, coming soon to a forum near you.