The Toolkit for Online Communities
16711 Community Members, 0 members online, 2487 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Openacs process disappearing : One Message

Forum OpenACS Q&A: Re: Re: Re: Re: Re: Re: Re: Openacs process disappearing

Posted by Gustaf Neumann on
Jason, do the tests return on both systems the correct boolean value? To be sure, try to use the function ad_page_contract_filter integer from version 1.20 http://eye.openacs.org/viewrep/OpenACS/packages/acs-tcl/tcl/tcl-documentation-procs.tcl

don't you see any error message in the error log from the 500 error?

Posted by Jason Cheung on

After some more testing it seems I know where the problem lies. It seems the master template (blank-master.adp) contained

ad_page_contract {

} {

{item_id:integer 0}
{cid:integer 0}
{return_url ""}

which it did not agree with .. guess it did do the validation after all and it was the display template which had the 500 problem!


I have 2 files - test.tcl and blank-master.tcl


ad_page_contract {

} {

ns_log Notice INSIDETEST


ad_page_contract {

} {
{x ""}

ns_log Notice BLANKMASTER

How might I pass value of x into blank-master in usual circumstances such as test?x=1 and test?x=a (this works;returns error) and also catch invalid urls such as test?x=1017%3C/p%3E%0D%0A%3Cp%3E (this causes server error).

A quick solution is to pass as a property in default-master and do integer validation further down in blank-master.

However, is there a coding convention that I am missing for passing queries to blank-master with better exception handling ?

The problem that I have had was rp processor displaying the error message within the master template which caught the same validation error thus resulting in a neverending error loop.