Last modified: 2014-05-01 02:31:06 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 T66692, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64692 - Flow rendering can drop text in a header edit
Flow rendering can drop text in a header edit
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-01 02:31 UTC by spage
Modified: 2014-05-01 02:31 UTC (History)
4 users (show)

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


Attachments

Description spage 2014-05-01 02:31:06 UTC
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.

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


Navigation
Links