Page MenuHomePhabricator

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

Description

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... https://sa.wikipedia.org/w/index.php?title=%E0%A4%95%E0%A4%B0%E0%A5%8D%E0%A4%AE%E0%A4%A3%E0%A5%8D%E0%A4%AF%E0%A5%87%E0%A4%B5%E0%A4%BE%E0%A4%A7%E0%A4%BF%E0%A4%95%E0%A4%BE%E0%A4%B0%E0%A4%B8%E0%A5%8D%E0%A4%A4%E0%A5%87...&action=edit&section=4

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 added a subscriber: NehalDaveND.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptNov 5 2015, 10:57 AM

before table constant pasted like this image.... Please do as like this.....

Elitre added a subscriber: Elitre.Nov 9 2015, 8:39 AM

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

Elitre added a comment.Nov 9 2015, 5:13 PM

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 test.wiki. That same reason.

Jdforrester-WMF removed Catrope as the assignee of this task.Nov 10 2015, 8:21 PM

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.
Catrope removed a subscriber: Catrope.Nov 10 2015, 10:11 PM
cscott added a subscriber: cscott.Nov 11 2015, 7:37 PM

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?

Thanks!

OS - Win7, Browser - crome, opera, mozila

  • Proper work :-

In VE I past

this table. and it's result is
I click on last option and went to edit mode and I found made "MsoNormalTable" here...
. After this
here I change the table name with wikitable and
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

"converting wikitext". 2 weeks ago this process was not there.
here you can see Any process hadn't been done there it had been pasted directly. Now
this the result of this "converting wikitext" process. It is not proper.

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

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....

Elitre added a comment.EditedNov 13 2015, 1:22 PM

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.

@Sphilbrick is encountering a very similar problem in Excel, and he can reproduce it very consistently: https://en.wikipedia.org/w/index.php?oldid=690522044#Copy_and_paste_table_using_VE

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

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

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

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

Jdforrester-WMF closed this task as Resolved.Nov 18 2015, 3:35 AM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF removed a project: Patch-For-Review.
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