Hey,
I observed a strange behaviour when using AOLserver on Ubuntu 14.04. When opening a form for editing, if the text field has an empty value (so $element(value) == ""), the browser would show the ? in a rhombus which usually signifies an unknown character in the character set.
I first assumed this has something to do with PostgreSQL, but as it happens even if PG isn't involved, I ruled it out. Then I tried the various other manually compiled culprits (XoTCL, LibThread etc.), really trying to find a needle in a haystack.
Ultimately I patched OpenACS acs-templating, which cured my problem and seems to have no ill side effects in the few pages of ]project-open[ I tested, but maybe someone else has observed this behaviour at one point?
Installation instructions I followed: http://erp4projects.de/install-project-open-on-ubuntu-14-4-lts/
EDIT: DO NOT USE THE BELOW CODE! DO NOT USE THE BELOW CODE! DO NOT USE THE BELOW CODE!
Patch:
commit 688b5adf4f31cfd9b7606ce5819be7041d814669
Author: Malte Sussdorff
Date: Sat Feb 7 10:19:20 2015 +0100
Remove the value field if the value is actually empty
diff --git a/tcl/widget-procs.tcl b/tcl/widget-procs.tcl
index 38848ad..e155d83 100644
--- a/tcl/widget-procs.tcl
+++ b/tcl/widget-procs.tcl
@@ -389,7 +389,7 @@ ad_proc -public template::widget::input {
# Handle display mode of visible normal form elements, i.e. not hidden, not submit, not button, not clear
if { $element(mode) ne "edit" && [lsearch -exact { hidden submit button clear checkbox radio } $type] == -1 } {
set output ""
- if { [info exists element(value)] } {
+ if { [exists_and_not_null element(value)] } {
append output [ad_quotehtml $element(value)]
append output "<input type=\"hidden\" name=\"$element(name)\" value=\"[ad_quotehtml $element(value)]\">"
}
@@ -400,7 +400,7 @@ ad_proc -public template::widget::input {
append output " disabled"
}
- if { [info exists element(value)] } {
+ if { [exists_and_not_null element(value)]} {
append output " value=\"[template::util::quote_html $element(value)]\""
}