Page MenuHomePhabricator

Wikitext paste conversion tool interferes with table pasting from MS Word when contents have wikitext fragments
Closed, ResolvedPublic8 Estimated Story Points


till last week Whenever I was coping table form ms word and pasting that in visual editor, than that table was converted in wikitable format. you can see here...

But In this week some other process is called "Converting Wikitext". In that process my table is not being as wikitable and it pasted like this...

अन्वयः विवरणम्
यदा अव्ययम्
ते युष्मद्-ज. सर्वे.ष.एक.
श्रुतिविप्रतिपन्ना आ.स्त्री.प्र.एक.
बुद्धिः इ.स्त्री.प्र.एक.
समाधौ इ.पुं.स.एक.
निश्चला आ.स्त्री.प्र.एक.
अचला आ.स्त्री.प्र.एक.
स्थास्यति √ष्ठा गतिनिवृत्तौ-पर.कर्तरि, लृट्.प्रपु.एक.
तदा अव्ययम्
योगम् अ.पुं.द्वि.एक.
अवाप्स्यसि अव+‍√आप्लृ व्याप्तौ-पर.कर्तरि, लृट्,प्रपु,एक.

केशव अ.पुं.स्मबो.एक.
समाधिस्थस्य अ.पुं.ष.एक.
स्थितप्रज्ञस्य अ.पुं.ष.एक.
का किम्-म.सर्व.स्त्री.प्र.एक.
भाषा आ.स्त्री.प्र.एक.
स्थितधीः ई.पुं.प्र.एक.
किम् किम्-म.सर्व.नपुं.प्र.एक.
प्रभाषेत प्र+√भाष् व्यक्तायां वाचि-आत्म.वि.लिङ्.प्रपु.एक.
किम् किम्-म.सर्व.नपुं.प्र.एक.
आसीत √आस् उपवेशने-आत्म.वि.लिङ्.प्रपु.एक.
किम् किम्-म.सर्व.नपुं.प्र.एक.
व्रजेत √व्रज् गतौ-आत्म.वि.लिङ्.प्रपु.एक.

And this is the big problem. You can understand before I was doing only copy and past. Now I have to make a wikitable every time.

Please do as was before or please put that old feature in new version. Thank you.....

Event Timeline

NehalDaveND assigned this task to Aklapper.
NehalDaveND raised the priority of this task from to Needs Triage.
NehalDaveND updated the task description. (Show Details)
NehalDaveND added a project: VisualEditor.
NehalDaveND subscribed.

pasted_file (404×442 px, 114 KB)
before table constant pasted like this image.... Please do as like this.....

@Elitre Thank you. Can you tell me this is a solvable problem or it is very long processed hard problem ?

I don't know, I don't have MS Word and therefore can't try to reproduce, and I don't recall about recent changes that meant VE lost the ability to retain table formatting. There's a bug triage meeting tomorrow, and if for some reason this task isn't evaluated then, I'll ask the team about it later in the week. HTH.

I think you forgot me. I talked to you at That same reason.

Please do not assign tasks to engineers in the hope that they will work on them. They won't.

Jdforrester-WMF renamed this task from Table pasting problem in visual Editor to Wikitext paste conversion tool interferes with table pasting from MS Word for one user(?).Nov 10 2015, 8:22 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

I wrote that paste code, I believe. I am not aware of any changes in the past weeks. We'd need a way to reproduce this before it could be fixed.

@NehalDaveND, can you upload a example Word document which has this problem? If possible, try to make it a minimal example—that is, try to remove as much as you can without removing the source of the problem. For example, if you have a 100 line table, try to reduce it to a 1 line table which has the same problem. If you can't make the problem appear in a 1 line table, try it in a 2 line table, and so on.

Also, can you tell us which operating system and browser you're using? Have you tried it in a second browser to see if the same problem happens?


@Neil_P._Quinn_WMF okay..

OS - Win7, Browser - crome, opera, mozila

  • Proper work :-

pasted_file (768×1 px, 943 KB)
In VE I past

this table. and it's result is
pasted_file (768×1 px, 947 KB)
I click on last option and went to edit mode and I found made "MsoNormalTable" here...
pasted_file (768×1 px, 514 KB)
. After this
pasted_file (768×1 px, 567 KB)
here I change the table name with wikitable and
pasted_file (768×1 px, 778 KB)
this is the result. All this process has done is 5 second.

  • Not working properly :-

I told you last week a new process had started called

pasted_file (768×1 px, 924 KB)
"converting wikitext". 2 weeks ago this process was not there.
pasted_file (768×1 px, 943 KB)
here you can see Any process hadn't been done there it had been pasted directly. Now
pasted_file (768×1 px, 1010 KB)
this the result of this "converting wikitext" process. It is not proper.

You can see here I had tried this in different browser. see...

pasted_file (768×1 px, 597 KB)
pasted_file (768×1 px, 1010 KB)
In other browser, computer and wiki ID also it not works.

I hope you understood this problem.

So here's my theory: something in MS Word's HTML paste output is triggering the "this looks like wikitext" heuristic, and causing the paste to be sent to Parsoid. But this really shouldn't be happening, since we shouldn't be triggering the heuristic if the paste type is text/html, only if it's text/plain. But perhaps MS Word isn't setting a content-type at all, or something is slipping through some other way.

In this case I don't think it's anything new which has changed in VE, I suspect it's some new document thing on the MS Word side which is suddenly causing the inclusion of '[[' (or some such) buried deeply in MS Word's HTML.

Just a theory.

We really needs a volunteer with MS Word to step through the process, ideally reproduce it with non-sanskrit text, but most importantly capture exactly what MS Word is trying to paste.

I can help with instrumenting a hacked VE to dump the paste contents, if we can locate someone (maybe in the SFO office) who has VE running on a local wiki and can reproduce the bug.

@NehalDaveND can you confirm that this bug is still occurring? I have a comment you added in phabricator in my email which includes, "Now it works properly so I request you please let it be like this." I can't find that comment above any more, perhaps you deleted it?

My working theory is that it was something about the specific document you were pasting from in MS Word which triggered the "looks like wikitext" heuristic. If that is the case, it wouldn't be surprising for the bug to "go away" when you pasted different text, or from a different document. That is why it is so important to come up with a reliable way to reproduce the bug, so we can understand what's actually going on.

@cscott I am confirming that "This bug is still occurring." I want to say that before whatever you wrote I couldn't understood. Can you tell me what can I do for this problem ? You wrote something technical thing and I couldn't gotten you properly. What is SFO office ? I will do anything to solve this bug and thank you for everything. :)

Although I don't have Word, I could "reproduce" the issue with this doc.
When copy/pasting this table, I too see that "converting wikitext" thing (although it's so fast I only understand that's what he sees because he described it before),
and this is the result.

see attached....

see attached....

To clarify, this is the file from where he took the table which produced this diff (the table in the diff is no longer in the document, though).

To clarify further, as I chatted a bit with the editor:
he expects that the table he pastes from Word is a styled one - with something like class="MsoNormalTable" at the beginning, which he can later change to class="wikitable" (see example from April: 1 - 2).
What he gets now instead is something which doesn't look like a table and can't be easily turned into one, and he thinks this is due to this conversion tool that he doesn't recall appearing before.

Change 253821 had a related patch set uploaded (by Esanders):
Paste handlers: Break after the HTML data item

Change 253821 merged by jenkins-bot:
Paste handlers: Break after the HTML data item

Jdforrester-WMF renamed this task from Wikitext paste conversion tool interferes with table pasting from MS Word for one user(?) to Wikitext paste conversion tool interferes with table pasting from MS Word when contents have wikitext fragments.Nov 18 2015, 9:29 PM