Page MenuHomePhabricator

Error loading table with broken wikitext syntax
Closed, ResolvedPublic1 Estimated Story Points

Description

This was observed while "Mam talent!" article is loaded in CX2 to be translated from English to Spanish (can be other language as well). Page seems to load correctly, but while article is being loaded into CX2, following Javascript error is thrown:

Uncaught TypeError: Cannot read property 'getOwner' of null
    at ve.ce.MWTableNode.js?7d2d0:129
    at Array.map (<anonymous>)
    at VeCeMWTableNode.ve.ce.MWTableNode.getTablesorterHeaderCells (ve.ce.MWTableNode.js?7d2d0:128)
    at VeCeMWTableNode.ve.ce.MWTableNode.updateSortableHeaders (ve.ce.MWTableNode.js?7d2d0:93)
    at later (core.js:237)

cx2-mam-talent-en-to-es-js-error.png (143×698 px, 19 KB)

Event Timeline

The root cause is broken table syntax (defining the row twice). Ideally VE should be able to handle that.

Esanders renamed this task from ve.ce.MWTableNode#getTablesorterHeaderCells throws Javascript error to Error loading table with broken wikitext syntax.Apr 19 2018, 1:05 PM

Minimal test case:

{| class="wikitable sortable"
!Foo
|-
|-
|Bar
|-
|}

Change 427656 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Sortable table header: Account for null entries in table matrix

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

Change 427656 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Sortable table header: Account for null entries in table matrix

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

Deskana set the point value for this task to 1.