Page MenuHomePhabricator

Edit using VisualEditor can't be saved at cswiki at one page
Closed, DuplicatePublic

Description

Hi developers,

an user tried to save an edit at https://cs.wikipedia.org/wiki/LGBT_pr%C3%A1va_ve_Spojen%C3%BDch_st%C3%A1tech_americk%C3%BDch using VisualEditor but it was unpossible, the server returned HTTP 400 as the response. Seems there can be some parsoid isuee. I tried to save an edit using VisualEditor-MediaWiki-2017WikitextEditor , it throw the same error. I tried to save an edit at my personal sandbox (https://cs.wikipedia.org/wiki/Wikipedista:Martin_Urbanec/P%C3%ADskovi%C5%A1t%C4%9B/1), server saved the edit successfully. I also tried to save an edit using OWE (accessed by manual adding action=edit to the URL), edit was saved.

If needed I can protect/semiprotect the page for debugging purposes or do any else sysop action.

Report: https://cs.wikipedia.org/w/index.php?title=Wikipedie:Pot%C5%99ebuji_pomoc&diff=14742565&oldid=14739009

Thank for fast fix in advance,
Martin Urbanec

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Needs really fast fix from my POV as I don't know how many pages affected.

Here is the error log from Kibana. Looks like some missing information in the HTML (either in what Parsoid generates or what VE returns to Parsoid after serialization). To be investigated. This is likely an edge case.

Bad Request: Cannot serialize mw:Transclusion without data-mw.parts or data-parsoid.src at Object.<anonymous> (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/src/lib/html2wt/DOMHandlers.js:1407:12) at /srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/prfun/lib/index.js:576:26 at tryCatch2 (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/babybird/lib/promise.js:48:12) at PrFunPromise.Promise (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/babybird/lib/promise.js:458:15) at new PrFunPromise (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/prfun/lib/index.js:101:21) at /srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/prfun/lib/index.js:574:18 at tryCatch1 (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/babybird/lib/promise.js:40:12) at promiseReactionJob (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/babybird/lib/promise.js:269:19) at PromiseReactionJobTask.call (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/babybird/lib/promise.js:284:3) at flush (/srv/deployment/parsoid/deploy-cache/revs/1bfb86bbf2ae5171af76082c6f15aadeb0e8950b/node_modules/asap/raw.js:50:29) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

Reproducible with this snippet. cswiki and enwiki exhibit different behavior on it.

With enwiki, here is the output and the mw:Transclusion wrapper has valid data-mw on it

[subbu@earth parsoid] echo "X <ref>{{cite news|url=http://talkingpointsmemo.com/talk/2008/06/the-audacity-of-hope-from-selm.php|title=The audacity of hope – 'from Selma to Stonewall{{'-}}|accessdate=January 22, 2013|date=June 27, 2008|work=TMP}}</ref>" | parse.js --prefix enwiki | sed 's/>/>\n/g;' | grep mw:Transclusion
<cite class="citation news" about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"stx":"html","dsr":[7,217,null,null],"pi":[[{"k":"url","named":true},{"k":"title","named":true},{"k":"accessdate","named":true},{"k":"date","named":true},{"k":"work","named":true}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"cite news","href":"./Template:Cite_news"},"params":{"url":{"wt":"http://talkingpointsmemo.com/talk/2008/06/the-audacity-of-hope-from-selm.php"},"title":{"wt":"The audacity of hope – &#39;from Selma to Stonewall{{&#39;-}}"},"accessdate":{"wt":"January 22, 2013"},"date":{"wt":"June 27, 2008"},"work":{"wt":"TMP"}},"i":0}}]}'>

With cswiki, here is the output and the mw:Transclusion wrapper is missing data-mw on it

[subbu@earth parsoid] echo "X <ref>{{cite news|url=http://talkingpointsmemo.com/talk/2008/06/the-audacity-of-hope-from-selm.php|title=The audacity of hope – 'from Selma to Stonewall{{'-}}|accessdate=January 22, 2013|date=June 27, 2008|work=TMP}}</ref>" | parse.js --prefix cswiki | sed 's/>/>\n/g;' | grep mw:Transclusion
<span about="#mwt3" typeof="mw:Transclusion" data-parsoid="{}">

But, anyway, with this snippet, we should be able to figure this out.

Looks like it is the embedded {{'-}} which throws off parsoid because it effectively leads to this wikitext: "[http://talkingpointsmemo.com/talk/2008/06/the-audacity-of-hope-from-selm.php The audacity of hope – 'from Selma to Stonewall[[:Šablona:'-]]] which if you notice closely generates a link within a link which is broken and cannot be represented in HTML. This breaks the outer link and trips up Parsoid. Will check if there is a way to handle this scenario when templates are involved, but if there is an edit to the wikitext to prevent the link-within-a-link effect, that would fix VE usability on it right away.