https://bugzilla.wikimedia.org/show_bug.cgi?id=50120

--- Comment #23 from Roan Kattouw <[email protected]> ---
Subbu, Gabriel and I figured this out on IRC, and Subbu and Gabriel are working
on a fix. Summary for the benefit of those following this bug:

* On the first parse (either upon first VE load after the cache is purged, or
upon the first edit after the purge), Parsoid parses the PERSONDATA template
from scratch (because there is no cached content to reuse) and does so
correctly. The output is something like <span>\n</span><table>...</table><link>
* On the second parse, (first or second edit after cache purge), Parsoid reuses
the template expansion from the first parse. It notices that the first (span)
and last (link) nodes are both inline, and so it assumes the entire template is
inline and wraps it in a <p>
* The browser receives this HTML and is unhappy about the <table> inside the
<p>, so it moves both the <table> and the <link> out of the <p>, leaving
<p><span>\n</span></p><table>...</table><link>. Because the table is not a
sibling of the span, VE doesn't recognize the table (or the link) as part of
the template. Due to a separate bug in VE, the newline after the link is moved
and ends up between the table and the link.
* VE sends this corrupted HTML back to Parsoid, which freaks out and duplicates
the table as well as a bunch of categories.
* After the page is edited again (possibly by the user saving the corrupted VE
output, possibly some other way), the third parse occurs, and Parsoid again
tries to reuse the previous parse's expansion of the template. However, because
of the <p> interruption, it only sees the span and doesn't see the table or the
link. The table and the link disappear from the output in this and all
subsequent parses, masking the bug. The user doesn't notice because the table
has style="display:none;"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to