Page MenuHomePhabricator

Missing data-mw content in wikitext leads to html2wt exceptions
Closed, ResolvedPublic8 Story Points

Description

[subbu@earth parsoid] echo "<ref>{{1x|foo}}[http://www.google.com [[boo]] ]</ref>" | parse.js --wt2wt

/home/subbu/work/wmf/deploy/node_modules/prfun/lib/index.js:426
      setTimeout(function() { throw e; }, 0);
                              ^
Bad Request: Cannot serialize mw:Transclusion without data-mw.parts or data-parsoid.src
    at Object.<anonymous> (/home/subbu/work/wmf/parsoid/lib/html2wt/DOMHandlers.js:1423:12)

Original bug report below. Reproduction above courtesy @Trizek-WMF
Hello !

I wish to modilfy a page : https://fr.wikipedia.org/wiki/Ren%C3%A9-Louis_Baron

But when I want to record I have this message : Quelque chose s'est mal passé - docserver-http: HTTP 400

This last for at least one week.

What can I do ?

Thanx

Related Objects

Event Timeline

Magelys created this task.Jul 24 2016, 4:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 24 2016, 4:22 PM
AlexMonk-WMF added a subscriber: AlexMonk-WMF.

Luckily I recognised this as a VE error code, but you should really note the editor or add the project

I don't get this error on loading the page - is it only on save?

Aklapper renamed this task from HTTP 400 to docserver-http: HTTP 400 trying to save an article on fr.wp.Jul 25 2016, 7:01 AM
Aklapper removed Magelys as the assignee of this task.Jul 26 2016, 12:11 PM

@Magelys: Assuming that you do not plan to work on fixing this problem yourself, removing you as the assignee. (See https://www.mediawiki.org/wiki/How_to_report_a_bug for more information.) :)

Jdforrester-WMF renamed this task from docserver-http: HTTP 400 trying to save an article on fr.wp to User getting "docserver-http: HTTP 400" error when trying to save an article on frwiki.Jul 26 2016, 7:09 PM
Jdforrester-WMF changed the task status from Open to Stalled.
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

I do not speak English, I tried to uderstand what happens with that page. Thanx

Yes The message appears when I want to save.

Trizek-WMF added subscribers: Drongou, Trizek-WMF.EditedJul 28 2016, 8:46 AM

@Drongou has that error yesterday. He reminds that he was using Youtube at the same time, which may have an impact on Safari(s performance. Page was blocked on error 400, without any possibility of reloading page or going backwards.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/601.7.7

I have tried with only Wikipedia opened on Internet Explorer, Mozzila or Chrome on 3 various PC, and I always have the same message :-(

Framawiki added a subscriber: Framawiki.EditedAug 19 2016, 6:26 PM

@AlexMonk-WMF Hi, 9 different users (lots of IP and new users) report the same problem at practically the same time, this afternoon. They explain that the HTTP error 400 Erreur lors du chargement des données depuis le serveur / Error when load data from the server appear when they edits with Visual Editor, but Wikicode editor work.
On this screenshot, Aavitus, a Chrome user, have a javascript alert when he try to open the VE, then redirected to the standard read-mode page.


https://fr.wikipedia.org/wiki/Sujet:T9wtwe84pz3n18fy
https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Questions_techniques/semaine_33_2016#Probl.C3.A8me_d.27acc.C3.A8s
Thanks you

Framawiki added a comment.EditedAug 19 2016, 6:36 PM

I have got the same error when try open VE on https://fr.wikipedia.org/wiki/Michel_Juff%C3%A9?veaction=edit
When I type Escape when the alert message is open, another appear with Erreur lors du chargement des données du serveur : nopage: The page parameter must be set. Voulez-vous réessayer ?
I have the problem on Firefox, but this work on IE.

greg added a subscriber: greg.Aug 19 2016, 6:54 PM

This appears to be frwiki only at this time. Can you try disabling all gadgets?

It's working without any gadget / common.js (my bot account) and after click on Restore to default params on Special:Preferences
But an IP report this too, and he can't have gadget, no ? ...

I saved the list of HTTP queries for https://fr.wikipedia.org/wiki/Michel_Juff%C3%A9?veaction=edit until the first error message is displayed on https://fr.wikipedia.org/w/index.php?title=Utilisateur:Orlodrim/test&oldid=128798674.

The URL that returns HTTP 400 is https://fr.wikipedia.org/api/rest_v1/page/html/undefined/mwTarget?redirect=false.

(I got an error twice in a Firefox session where I was not logged in, but now I cannot reproduce it anymore)

Framawiki added a comment.EditedAug 19 2016, 7:41 PM

Same as Orlodrim, it still working on different pages after my reconnection for test with my other account. It work too when I'm entirely disconnected (clear cookies).
So, problem with cookies ? Tokens ?

Trizek-WMF changed the task status from Stalled to Open.Aug 20 2016, 9:50 AM
Trizek-WMF raised the priority of this task from Medium to High.

Triaging as High, because we have a lot of new reports from fr.wp, as described above.

Yeah, that must be something going wrong on the client side. I suspect the recent reports might be a different underlying problem with the same user-visible symptom.
This URL would be generated by ArticleTargetLoader if you passed an undefined pageName and the targetName as oldid.

I don't see any way that could happen from the code, though I'm not in a position to be testing/debugging this properly right now. @Esanders?

I'm asking users if they have enabled a particular gadget or script.

Apparently, it is not gadget related, but mostly for people using Chrome.

Do you know if it's been happening on any other wikis?

Framawiki renamed this task from User getting "docserver-http: HTTP 400" error when trying to save an article on frwiki to User getting HTTP 400 error with VE on frwiki.Aug 23 2016, 10:30 PM

I'm asking.

Some people managed to have VE back by re-initializing Chrome. That's a little bit too much.

Jdforrester-WMF set the point value for this task to 8.Aug 31 2016, 7:18 PM
Trizek-WMF added a comment.EditedNov 28 2016, 10:25 AM

After a new feedback about an article shorter than others, I've been able to test some cases, to isolate a problematic bit of wikitext.

You can trigger an error 400 when you are in a <ref> and you have an internal link into an external link and the external link is contiguous to a template:

<ref>{{en}}[http://articles.chicagotribune.com/1985-09-28/business/8503060172_1_hamish-maxwell-philip-morris-headquarters-in-rye-brook Philip Morris Agrees To Buy General Foods, [[Chicago Tribune]], 28 septembre 1985]</ref> with an internal link (Chicago tribune) into an external link - reproduiced in <ref>{{mdr}}[http://www.perdu.com [[nouveau]] test]</ref> (related article)

Same thing in René-Louis Baron, the first article reported: <ref>Article de presse : [http://realcomposer.fabx.org/Medal%20-%20Inventeur.htm Article de Pierre Dufour - ''Dauphiné libéré'' - Avril [[2000]]].</ref> trigers an error 400.

But <ref>{{vid}}[http://www.youtube.com/watch?v=Zt2IDNi14ZE Laboratoire de recherches MedalMusic sys.''], [[YouTube]].</ref>, in the same article with unbalanced italic doesn't triggers an error 400.

Note: if I paste one of the examples I've found in VE mode of Flow, I have a clear warning concerning parsing : "Unable to transfer content: Error contacting the server for conversion between wikitext and HTML. Please check your Internet connection or try again later if the problem persists. If you still get this error please file a bug."

This bug affects beta editor too which brings me to through this is parsoid isuee not only visualeditor one. Added relevant projects then.

Urbanecm moved this task from Backlog to Watching on the User-Urbanecm board.Mar 2 2017, 5:02 PM
ssastry renamed this task from User getting HTTP 400 error with VE on frwiki to Missing data-mw content in wikitext leads to html2wt exceptions.Apr 24 2017, 10:11 PM
ssastry updated the task description. (Show Details)
ssastry moved this task from Backlog to Next Up on the Parsoid board.
Arlolra claimed this task.May 11 2017, 7:01 PM

Change 353531 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] T141226: Fix logic when unpacking dom fragments

https://gerrit.wikimedia.org/r/353531

Change 353531 merged by jenkins-bot:
[mediawiki/services/parsoid@master] T141226: Fix logic when unpacking dom fragments

https://gerrit.wikimedia.org/r/353531

Arlolra closed this task as Resolved.May 12 2017, 1:13 PM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMay 12 2017, 1:13 PM