Last modified: 2014-02-06 01:18:41 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 T62897, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60897 - VisualEditor: HTML content model constraints are sometimes violated
VisualEditor: HTML content model constraints are sometimes violated
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-02-06
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-05 14:22 UTC by Elitre
Modified: 2014-02-06 01:18 UTC (History)
9 users (show)

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


Attachments

Description Elitre 2014-02-05 14:22:09 UTC
See 
https://it.wikipedia.org/w/index.php?title=Utente%3AElitre_%28WMF%29%2FSandbox_VE3&diff=63988076&oldid=63988055 ,
or https://it.wikipedia.org/w/index.php?title=Oreste_Tommasini&diff=63836558&oldid=61161898, or https://it.wikipedia.org/w/index.php?title=Frederic_William_Maitland&diff=63692381&oldid=59785358 .

Reproduced with Chrome, FF, Opera (unlogged), tested with both skins.

You only need to add the Template:Interprogetto to an existing page or a new one.
Useless code like <span data-ve-ignore="true" about="g0.8632714317645878"></span> is added.
James, bug 59653, IMHO, had a similar problem.
Comment 1 James Forrester 2014-02-05 16:44:57 UTC
There was a related issue beforehand – but this isn't getting copied, so I can't work out out data-ve-ignore is getting added to the HTML?
Comment 2 Ed Sanders 2014-02-05 17:01:44 UTC
This extra HTML is correctly added here for the sake of putting something meaningful into the external clipboard. data-ve-ignore tells the converter to ignore it if it's pasted into another VE instances, and about="g[random]" tells Parsoid to ignore it. However the about grouping appears not to be working at Parsoids end:

HTML:
<p><span about="g1" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;href&quot;:&quot;Template:Interprogetto&quot;,&quot;wt&quot;:&quot;Interprogetto&quot;},&quot;params&quot;:{&quot;commons&quot;:{&quot;wt&quot;:&quot;cats&quot;}}}}]}" data-ve-no-generated-contents="true"></span><span data-ve-ignore="true" about="g1"></span><ul data-ve-ignore="true" about="g1">
<li>Foo</li>
</ul>
<span data-ve-ignore="true" about="g1">

</span></p>

Wikitext:
{{Interprogetto|commons = cats}}
* Foo

<span data-ve-ignore="true" about="g1"></span>

The first about-grouped sibling is discarded, but the subsequent ul and span are not.
Comment 3 Ed Sanders 2014-02-05 17:33:24 UTC
So this is caused by new templates always being inline templates, as we don't know if they are block templates until they render. As a result the above HTML is invalid (<ul> inside a <p>) which after Parsoid fixes, means the about-grouped items are no longer siblings.
Comment 4 ssastry 2014-02-05 17:39:56 UTC
This is scenario #3 from https://www.mediawiki.org/wiki/Parsoid/DOM_notes#Efficient_re-rendering_on_edits
Comment 5 Elitre 2014-02-05 18:48:28 UTC
Is Bug 60375 related?
Comment 6 ssastry 2014-02-05 19:02:50 UTC
Moving it back to VE.
Comment 7 Ed Sanders 2014-02-05 19:56:46 UTC
(In reply to comment #5)
> Is Bug 60375 related?

Looks like it.
Comment 8 Gerrit Notification Bot 2014-02-05 20:28:32 UTC
Change 111518 had a related patch set uploaded by Esanders:
Only generate transclusion contents for clipboard

https://gerrit.wikimedia.org/r/111518
Comment 9 Gerrit Notification Bot 2014-02-05 23:02:30 UTC
Change 111518 merged by jenkins-bot:
Only generate transclusion contents for clipboard

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

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


Navigation
Links