Last modified: 2014-02-28 23:41:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55548, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53548 - VisualEditor: nowiki tags thrown right after a template
VisualEditor: nowiki tags thrown right after a template
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 18:28 UTC by Elitre
Modified: 2014-02-28 23:41 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Elitre 2013-08-29 18:28:40 UTC
I am filing a related common problem we meet at it.wp.

We had troubles with nowikis being thrown right after some templates when the
user did not add an extra space there, but simply edited something in that
page. See
https://it.wikipedia.org/w/index.php?title=Wikipedia&diff=61171396&oldid=61171228
.

We actually found a workaround for this:
https://it.wikipedia.org/w/index.php?title=Template:Quote&curid=224372&diff=61173726&oldid=60749506
but since this addition is apparently a nonsense, users demand that VE prevents
that behaviour instead.

They also think this is related to templates featuring some kind of table.

I did some tests as well.
I was able to reproduce an unwanted situation where the first line and the
table (which is actually a template) were mingled in a non-editable block
https://it.wikipedia.org/w/index.php?title=Utente%3AElitre_%28WMF%29%2FSandbox_VE&diff=61181542&oldid=61181524
.

But I was also able to avoid nowikis, even if the extra span tags were not
added to the template: as you can see here
https://it.wikipedia.org/w/index.php?title=Utente:Elitre_(WMF)/Sandbox_VE&diff=prev&oldid=61181473,
if the first letter of the line is actually closer to the template's final
brace (with no space between), VEditing that page will result in the text
getting automatically placed in a better position, and no nowikis in sight,
even after multiple saves of the page.

Thanks.
Comment 1 ssastry 2013-08-29 18:47:30 UTC
Related Parsoid behavior (this is serialization of new content):
-----------------------
[subbu@earth lib] echo "<table><tbody><tr><td>foo</td></tr></tbody></table> a" | node parse --html2wt
{|
|foo
|}
<nowiki> </nowiki>a
-----------------------

The following is for existing content in wikitext
-----------------------
[subbu@earth lib] echo "{|\n|a\n|} a" | node parse --wt2wt
{|
|a
|} a
-----------------------

So, Parsoid does not split the line after the table if it is old content, but does if it is new content and can introduce a <nowiki>  Since the report states that happens no matter what is edited on the page, my suspicion is that the HTML has a newline break after the <table> added by VE.  Requires further investigation that I cannot do right now, but hope this is good for starters. Adding others who might have time to investigate.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links