Page MenuHomePhabricator

Error loading table with broken wikitext syntax
Closed, ResolvedPublic1 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)

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptApr 19 2018, 12:20 PM
Esanders triaged this task as Low priority.Apr 19 2018, 1:04 PM

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 closed this task as Resolved.Apr 20 2018, 9:48 AM
Deskana set the point value for this task to 1.