Last modified: 2013-04-22 16:40:04 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 T49498, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47498 - [Regression] Parsoid: Whitespace between template parameter name and value is lost
[Regression] Parsoid: Whitespace between template parameter name and value is...
Status: RESOLVED DUPLICATE of bug 47434
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
: code-update-regression
Depends on:
Blocks: 39564
  Show dependency treegraph
 
Reported: 2013-04-22 07:38 UTC by Krinkle
Modified: 2013-04-22 16:40 UTC (History)
3 users (show)

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


Attachments

Description Krinkle 2013-04-22 07:38:41 UTC
1. http://parsoid.wmflabs.org/_rtform/
   or https://en.wikipedia.org/wiki/Calendar_(application)

Raw:

{{Redirect|iCal|the standard file format for addresses and calendar entries|iCalendar|other uses|Ical (disambiguation){{!}}Ical}}
{{Infobox software
|name = Calendar
|logo = [[File:Calendar Icon.png|64px]]
|screenshot = [[File:OS X Calendar.png|300px]]
|caption = Calendar 6 under [[OS X Mountain Lion]]
|developer = [[Apple Inc.]]
}}

2. Back from Parsoid:



{{Redirect|iCal|the standard file format for addresses and calendar entries|iCalendar|other uses|Ical (disambiguation){{!}}Ical}}
{{Infobox software
|name =Calendar
|logo =[[File:Calendar Icon.png|64px]]
|screenshot =[[File:OS X Calendar.png|300px]]
|caption =Calendar 6 under [[OS X Mountain Lion]]
|developer =[[Apple Inc.]]
}}

This is causing dirty diffs on almost every page on en.wikipedia.org. This used to work.
Comment 1 ssastry 2013-04-22 07:57:23 UTC
I think this is related to https://bugzilla.wikimedia.org/show_bug.cgi?id=47434

Detailed explanation follows:

* On parsoid.wmflabs.org, selective serialization (selser) is enabled. This immediately sets the regular (non-selser) serializer in editing mode. Since we've enabled editing support for templates, in non-selser mode, templates are rendered assuming parameters have been edited.  This then normalizes white-space.

* The reason for why selser is disabled is in the bug above.

That said, here are a couple improvements we could do on the Parsoid end:

1. Disable editing support for templates at this point, since VE doesn't support that anyway.
2. Add another level of modification detection for template parameters in addition to whether we are in selser mode (but that merely adds additional state we have to maintain in the DOM)
3. Change the tpl-wikitext normalization to add a space before/after the "=".  But, this just shifts dirty diffs to templates that dont use spaces before/after the "=".

For now, I would recommend 1.  In addition, we should maybe apply 3. as well depending on the most common whitespace use around template parameters.

But, we should try to ensure the selective serialization is enabled as far as possible.
Comment 2 Gabriel Wicke 2013-04-22 14:45:16 UTC
I fixed bug 47434 in VE master, but this fix is not yet deployed. I have verified that templates are not marked as differing with selser enabled, so things work fine once the VE code is updated.

Disabling editing support would be a temporary work-around. I think it is much preferable to deploy the fix to bug 47434 asap as this also avoids a host of other issues that are now reported (predictably) as bugs.

*** This bug has been marked as a duplicate of bug 47434 ***
Comment 3 James Forrester 2013-04-22 14:47:16 UTC
[Edit conflict] Agreeing with Gabriel - his patch for bug 47434 will be going out in the push on Thursday; assuming that this fixes that, yay.
Comment 4 Gabriel Wicke 2013-04-22 16:40:04 UTC
(In reply to comment #1)
> 3. Change the tpl-wikitext normalization to add a space before/after the
> "=". 
> But, this just shifts dirty diffs to templates that dont use spaces
> before/after the "=".

It seems that large template transclusions like infoboxes tend to use spaces around the '=', while citations and other 'inline' transclusions omit them mostly. From a quick look I got the impression that overall both options are about equally good or bad. 

In any case this is not directly relevant to the cause of this bug.

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


Navigation
Links