Forum OpenACS Q&A: Re: Unable to login after upgrade to OpenACS 5.1

Collapse
Posted by Torben Brosten on
Oops.. Didn't see that the message was part of thread.

the problem I'm getting:

  wrong # args: should be "AcsSc.auth_authentication.authenticate.local username password parameters"...

And if I try to create a new user:

Error in include template "/usr/local/www/bitscafe.com/openacs-5.0.2/packages/acs-subsite/lib/user-new": can't use empty string as operand of "!"

suggestions much appreciated,

Torben

Collapse
Posted by Malte Sussdorff on
Increase the version number of acs-subsite and acs-authentication. Try to upgrade. If this does not help, exectute the apm-callback procedure for upgrade manually by adding it to e.g. zzz-postload.tcl.

MAKE SURE TO ONLY DO THIS ONCE !!!!

Otherwise you will end up with multiple additional parameters in acssc and you will have to remove them manually. This is due to the fact that the apm-callback-procs.tcl for the upgrade is calling a procedure which is not there once you make the upgrade and this breaks your system.

Already a message has been send to the OCT about this, here is a copy for reference:

The acs_authentification update is screwed as the service contracts are not renewed during an update. Not to mention that the new parameter "self-registration" is not added during the upgrade.

It would be good if core changes are made, that touch

- The data modell
- The Service Contracts
- Parameters

if one does not only test the install but also the upgrade path.

...

Furthermore, maybe I'm missing something, but the apm-callback "after upgrade" function is called after you say "upgrade" for a package. Saying upgrade though will not reload the files in the /tcl directory, namely not /apm-callback-procs.tcl

I assume it is therefore unwise to call a procedure defined in apm-callback-procs.tcl if the to be called procedure is not reloaded first....

Collapse
Posted by Malte Sussdorff on
Just in case people keep stumbling over this. Here is a step by step guide.
  • Copy this code from /packages/acs-authentication/tcl/apm-callback-procs.tcl to /tcl/zzz-postload.tcl, or, if you run .LRN, /packages/dotlrn/tcl/zzz-postload.tcl

    
     # this is a direct update to the SC tables, we should expect a new
     # API for handling updates on SC, but since there's no one yet,
     # we'll do this way now .... (roc)
    
     set sc_change [list {auth_authentication.Authenticate.InputType} {auth_password.ChangePassword.InputType} {auth_password.ResetPassword.InputType}]
     set element_msg_type_name integer
    
     foreach msg_type_name $sc_change {
      set msg_type_id [db_string get_msg_type_id { select msg_type_id from acs_sc_msg_types where msg_type_name = :msg_type_name }]
      set element_pos [db_string get_pos { select max(element_pos) from acs_sc_msg_type_elements where msg_type_id = :msg_type_id }]
      incr element_pos
     
      acs_sc::msg_type::element::new \
       -msg_type_name $msg_type_name \
       -element_name authority_id \
       -element_msg_type_name $element_msg_type_name \
       -element_msg_type_isset_p f \
       -element_pos $element_pos
            
     }
    
    
  • Restart you server once
  • Remove zzz-postload.tcl
Collapse
Posted by Jade Rubick on
I got this again when upgrading to OpenACS 5.1.2 from 5.1.1

I tried Malte's method to fix it, and it didn't work.

I think the issue is when your database hasn't been upgraded, but you have upgraded your files. If you restart and try to log in before upgrading the database, perhaps then it doesn't allow you to log in?

That's my theory right now, anyway.

I'm going to revert the code to OpenACS 5.1.1 and see if that let's me log in.

I tried it, and it didn't work:

cd packages
cvs update -r openacs-5-1-1 acs*

(tried logging in, didn't work)
svc -t /service/myservice
(tried logging in, didn't work)

Any other ideas?