https://bugzilla.wikimedia.org/show_bug.cgi?id=64692
Bug ID: 64692
Summary: Flow rendering can drop text in a header edit
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Flow
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Web browser: ---
Mobile Platform: ---
I was testing Flow's edit header. By chance I found adding some text after the
template, e.g.
{{Flow-enabled}} some text afterwards
was not appearing. I reproduced on mediawiki.org and beta labs.
Yet if I reload the page or request it in another browser, the extra text
appears. The extra text is in the API response, its "rendered" key ends with
"<table ...>...
Again, your input is appreciated and needed!</td>
</tr></tbody></table> some text afterwards"
so where did the trailing text go?!
It turns out the jQuery replacement code in
mw.flow.action.header.edit.prototype.render() in modules/header/forms.js is
doing it:
.find( '#flow-header-content' )
.empty()
.removeClass( 'flow-header-empty' )
.append( $( output.rendered ) )
.end()
output.rendered contains all the HTML in the API response. But $(
output.rendered ) *only* contains Object[table.plainlinks], not the HTML on the
end. So it just vanishes, it is never inserted.
The same idiom of appending or prepending $( output.rendered ) occurs elsewhere
in the JS code, I haven't tried reproducing this bug with other Flow elements
or other kinds of generated HTML.
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l