Forum OpenACS Development: Re: HEAD redirect to registration behavior is different/broken

Lars: fresh HEAD checkout ~7 PM PST Saturday...

(a few messages have been exchanged through the bug tracker's "comment" mechanism, but I would like to continue the discussion here since the problem resolution may benefit others searching through the forums. When it's resolved, I'll summarize to the open bug.)

I've whittled the code down to the minimum required to illustrate the problem. The following used to work under both 4.x and 5.x. I turned debug off to make logging clearer.

The following short script goes into the /www/register/ directory.

#===========================================================
# This is a minimal illustration of the problem:
# the second ns_log is never reached.

set p "user-join-custom"

ns_log notice "$p: before ad_maybe_redirect_for_registration"
ad_maybe_redirect_for_registration
ns_log notice "$p: after ad_maybe_redirect_for_registration"

# more stuff...
#===========================================================

Now, do the following:

  1. logout
  2. request http://yourserver/register/user-join-custom?group_id=552&invitation_code=1 (url vars to illustrate what I'm trying to accomplish)
  3. login as some existing user, or go ahead and register new. The failure occurs either way. I need it to work under both conditions.
  4. after login, you will land in /pvt/home
  5. check your server error log for the ns_log entries and you'll see that the first one appears. The second one doesn't.
Here's what my log shows:
[18/Oct/2003:20:51:04][20583.1080589904][-conn3-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1
[18/Oct/2003:20:51:04][20583.1080589904][-conn3-] Notice: user-join-custom: before ad_maybe_redirect_for_registration
[18/Oct/2003:20:51:18][20583.1081093712][-conn4-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1
[18/Oct/2003:20:55:59][20583.1074716240][-sched-] Notice: Swept developer support information for 0 requests (103 nsv elements)