Forum OpenACS Development: Re: POST Method can be broken when using host node map

Ok Dave, you are right. The rendered HTML form does not include the subsite part of the code.

I guess I found out what was the error about. I was using the confirm-template switch, and the file acs-templating/resources/forms/confirm-button.tcl had the following code:


set __return_url__ [ad_conn url]

This would work, but the RP patch has the following lines:


# Normal case: Prepend the root to the URL.
# 3. set the intended URL
ad_conn -set url ${root}${url}

# 4. set urlv and urlc for consistency
set urlv [lrange [split $root /] 1 end]
ad_conn -set urlc [expr [ad_conn urlc]+[llength $urlv]]
ad_conn -set urlv [concat $urlv [ad_conn urlv]]

These lines where causing conflict. Even thought the subsite URL was not included in the form action, when you go to the confirm template page, the above lines where including the subsite URL in form action, and maybe that's why my form was broken.

I've change acs-templating/resources/forms/confirm-button.tcl to:


set __return_url__ [ns_conn url]

I don't know if this is an workaround, because when I watch the log and see the ad_conn url behavior, it changes from not include the subsite URL (/add-edit) to include it (/subsite/add-edit). If this is the right behavior, I guess this fix in confirm-button.tcl must be enough.

Anyway, I'm sorry for all the trouble I've caused you guys and thank you very much for the help.