Last modified: 2013-07-04 10:34:48 UTC
Contents of [[Parsoidcrash]]: <!-- Foo --> Bar Load page into the editor, change Bar to Baar, and save. You'll get an error. Wireshark reveals that the following happened: POST /localhost/Parsoidcrash HTTP/1.0 Host: localhost:8000 Accept: */* Accept-Encoding: deflate, gzip Referer: http://localhost/wiki/API User-Agent: MediaWiki/1.21alpha Content-Length: 254 Content-Type: multipart/form-data; boundary=----------------------------5e7e7b667ce1 ------------------------------5e7e7b667ce1 Content-Disposition: form-data; name="content" <!-- Foo --> <p data-ve-changed="{"content":1}" data-parsoid="{"dsr":[14,17,0,0]}">Baar</p> ------------------------------5e7e7b667ce1-- HTTP/1.1 500 Internal Server Error X-Powered-By: Express Content-Type: text/x-mediawiki; charset=UTF-8 Content-Length: 602 Connection: close TypeError: Cannot call method 'cloneNode' of undefined at [object Object].serializeDOM (/var/lib/parsoid/Parsoid/js/lib/mediawiki.WikitextSerializer.js:2330:16) at /var/lib/parsoid/Parsoid/js/api/ParserService.js:593:55 at /var/lib/parsoid/Parsoid/js/api/ParserService.js:284:4 at /var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:185:3 at [object Object].<anonymous> (/var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:209:4) at Array.1 (/var/lib/parsoid/Parsoid/js/lib/mediawiki.ApiRequest.js:60:4) at EventEmitter._tickCallback (node.js:192:40)
This is the same fragment parsing issue you ran into earlier while implementing the iframe trick. The comment ends up outside of the implicit HTML element in the DOM, which breaks our path to the body. We shall make sure that we always wrap things at least in a body tag when parsing a fragment.
Patch submitted in https://gerrit.wikimedia.org/r/49185.
Merged on the 15th.
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]