Last modified: 2011-07-26 03:10:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31978, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29978 - Textarea tag with autocomplete doesn't close
Textarea tag with autocomplete doesn't close
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized major (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-20 10:19 UTC by Peter
Modified: 2011-07-26 03:10 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Peter 2011-07-20 10:19:27 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.
Comment 1 Niklas Laxström 2011-07-20 10:23:54 UTC
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.
Comment 2 Yaron Koren 2011-07-26 03:10:02 UTC
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. :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links