Page MenuHomePhabricator

VisualEditor: HTML content model constraints are sometimes violated
Closed, ResolvedPublic


See ,
or, or .

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.

Version: unspecified
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:57 AM
bzimport set Reference to bz60897.

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?

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:

<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">
<span data-ve-ignore="true" about="g1">


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

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.

(In reply to comment #5)

Is Bug 60375 related?

Looks like it.

Change 111518 had a related patch set uploaded by Esanders:
Only generate transclusion contents for clipboard

Change 111518 merged by jenkins-bot:
Only generate transclusion contents for clipboard