Last modified: 2011-07-26 03:10:02 UTC
I have a form with two autocomplete textareas. Editing pages works without a problem, but when creating a new page the textarea tag isn't closed and the rest of the page html is interpreted by the browser as the content of the textarea. This problem popped up when I upgraded to SF 2.2 and M 1.17. The problem doesn't happen on the acceptance server, which was upgraded to MW 1.16 and probably a lower version of SF 2.1 (I can't check at the moment). I did some digging and tracked the problem down to line 1087 of SF_FormInputs.php where the textarea element is created: $textarea_input = Xml::element('textarea', $textarea_attrs, $cur_value, false); Apparently, when the $cur_value param is null, the Xml::element renders a start tag only. When I change the line to $textarea_input = Xml::element('textarea', $textarea_attrs, $cur_value." ", false); the problem disappears.
Cast it into a string or use Html::element. Xml::element has that ugly behavior but there isn't much we can do about it except provide an better alternative.
Changing this to "fixed" instead of "worksforme" - this was a bug in Semantic Forms. I added a fix that's already in use elsewhere. This is fixed now in SVN - if you do get the SVN version, please note that the file structure has changed considerably; don't be alarmed. :)