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.
Version: master
Severity: normal