ProofreadPageTarget dirty diffing
Closed, ResolvedPublic8 Story Points

Description

With a null edit on http://en.wikisource.beta.wmflabs.org/wiki/Page:Dictionary_of_National_Biography_volume_51.djvu/358?veaction=edit :


I get a different dirty diff with the same code locally:

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 23 2016, 10:29 AM
Esanders triaged this task as High priority.Jun 23 2016, 10:30 AM

Looking at the HTML:

Before:

<body>
	<meta typeof="mw:Includes/NoInclude" id="mwAQ">
	<div [mw template]></div>
	<div class="pagetext" id="mwAw">
		<span [mw template]></span>
		<p id="mwBQ">
			<br id="mwBg"/>

			<meta typeof="mw:Includes/NoInclude/End" id="mwBw">
			Foo bar baz
		</p>
		<p id="mwCQ">
			Quux
		</p>
		<meta typeof="mw:Includes/NoInclude" id="mwEg">
		<ol class="mw-references" typeof="mw:Extension/references"></ol>
	</div>
	<meta typeof="mw:Includes/NoInclude/End" id="mwFA">
</body>
<body>
	<meta typeof="mw:Includes/NoInclude" id="mwAQ">
	<div [mw template]></div>
	<div class="pagetext" id="mwAw">
		<span [mw template]></span>
		<p id="mwBQ"><br id="mwBg"></p>
	</div>
	<meta typeof="mw:Includes/NoInclude/End" id="mwBw">
	Foo bar baz
	<p id="mwCQ">
		Quux
	</p>
	<meta typeof="mw:Includes/NoInclude" id="mwEg">
	<ol class="mw-references" typeof="mw:Extension/references"></ol>
	<meta typeof="mw:Includes/NoInclude/End" id="mwFA">
</body>

The paragraph gets unwrapped but converting this to wikitext that shouldn't be a problem.

Why is the mw:Includes/NoInclude/End getting moved out of the p though?

Because the <div class="pagetext"> is being confined to the header so sections are balanced, which means closing it when the mwBw noinclude is encountered.

Because the <div class="pagetext"> is being confined to the header so sections are balanced, which means closing it when the mwBw noinclude is encountered.

Sorry, I meant <meta typeof="mw:Includes/NoInclude/End" id="mwBw"> being moved out of <p id="mwBQ"><br id="mwBg"></p> (along with the text node).

So part of the problem is that <div class="pagetext"> is cached by RESTBase, so we'll need to do a big purge now the content model has changed.

The pagetext div was a caching issue, we got it to go away by editing the page. The remaining dirty diff happened because {{RunningHeader}}</noinclude>at a later date.) blah blah blah was all considered one template by Parsoid, and we tried to split in the middle of a templated block. This is now "fixed" because I imported the RunningHeader template (it was previously a red link).

This fixed the dirty diff (see this clean VE edit), but the first paragraph was still considered templated in its entirety. I "fixed" this by removing newlines from the float left template, but this seems to be another Parsoid bug. I'll try to isolate these bugs.

... but the first paragraph was still considered templated in its entirety. I "fixed" this by removing newlines from the float left template, but this seems to be another Parsoid bug. I'll try to isolate these bugs.

See T137942: Template + First paragraph treated like a complex transclusion

Jdforrester-WMF set the point value for this task to 8.Jun 30 2016, 12:06 PM

Change 297138 had a related patch set uploaded (by Tpt):
Removes <div class="pagetext"> during VisualEditor loading

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

Change 297138 merged by jenkins-bot:
Removes <div class="pagetext"> during VisualEditor loading

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

Tpt closed this task as Resolved.Mar 27 2017, 3:39 PM
Tpt claimed this task.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 27 2017, 3:39 PM