Forum OpenACS Development: A quick-n-dirt bug fix for xowiki, when a @variable@ is not found
Posted by Rildo Pragana on 01/18/09 07:28 PM
Here is a tiny contribution mine. A patch for xowiki/tcl/xowiki-procs.tcl. If we try to use an undefined variable, the page will crash (we have to edit back and remove the variable). This way, it returns (correctly, I think) the error log with the available @__template_variables__@ computed. Please apply the patch below against the current CVS version of xowiki patckage:
1311c1311 < return "This will return a list, as expected by class Page instproc substitute_markup.Error in Page $name: $__errMsg$content
Possible values are$__template_variables__" --- > return [list "Error in Page $name: $__errMsg$content
Possible values are$__template_variables__" text/html]
Posted by Gustaf Neumann on 01/19/09 08:23 AM
thanks for the fix; it is essentially correct. The same code is used for openacs textarea and richtext widgets, where only the second one (predominant case) uses the representation of [list content mime-type]. I'll take the opportunity to simplify the code and make this fact explicit.