Last modified: 2013-09-27 17:09:02 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 T53211, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51211 - Foster-parentable metas not about-marked
Foster-parentable metas not about-marked
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High major
: ---
Assigned To: ssastry
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-12 00:45 UTC by Gabriel Wicke
Modified: 2013-09-27 17:09 UTC (History)
3 users (show)

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


Attachments

Description Gabriel Wicke 2013-07-12 00:45:46 UTC
Test page:
http://parsoid.wmflabs.org/mw/User:GWicke/TestUnbalancedTablePage

Minimal test case:
echo -e '{{echo|<table>}}{{DEFAULTSORT:Page, Main}}' | node parse

When parsed with a browser, the meta is foster-parented out and not about-marked.
Comment 1 ssastry 2013-07-12 16:14:47 UTC
This is a bug from our html5 tree builder not fostering metas.  This will be fixed either when we stop relying on metas not fostering out (and fix the html5 builder), or we explicitly foster them out ourselves.

How common is this use case (in terms of priority for fixing this)?
Comment 2 Gabriel Wicke 2013-07-12 19:43:40 UTC
I don't think it is super-common, but if it happens inside templated content then it can result in a major round-trip failure as an about group is cut up.

I was thinking about adding a foster-parenting DOMPostProcessor pass for now. That should be pretty straightforward- register for table elements and inspect children for foster-parentable content. If there is any, foster-parent as far up until it is out of foster-parentable position and mark it with any about group found on the table. Not sure if the multi-foster case can really happen. Needs testing.
Comment 3 ssastry 2013-07-17 19:19:34 UTC
Looks like this corruption is because content gets fostered out of the table on load in VE.  One more instance of fosterable content that needs to be handled.

https://en.wikipedia.org/w/index.php?title=List_of_Jessie_episodes&diff=564684769&oldid=564554799
Comment 4 Arlo Breault 2013-09-27 17:09:02 UTC
The minimal test case above now looks like this:

<body data-parsoid='{"dsr":[0,43,0,0]}'><meta property="mw:PageProp/categorydefaultsort" content="Page, Main" data-parsoid='{"src":"{{echo|<table>}}{{DEFAULTSORT:Page, Main}}","fostered":true,"dsr":[0,42,null,null],"pi":[[{"k":"1","spc":["","","",""]}]]}' about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"<table>"}},"i":0}},"{{DEFAULTSORT:Page, Main}}"]}'><table about="#mwt1" data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[null,42,null,0]}'></table>

Fixed in 0d6c4aaf4e3621d576c7a15a84b243af71af793b.

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


Navigation
Links