HTML comments between table cells or list items can end up as 'commentMeta' nodes appearing as direct children of 'tableRow' / 'list' nodes, which breaks editing of those tables/lists. You can still type in them, but various structural operations blow up or have unexpected results.
For example with these wikitext inputs:
* 1 <!-- foo --> * 2
{|
|1
<!-- foo -->
|2
|}Example broken operations:
- Select the list and use List → Bullet list from the toolbar to unwrap it – causes an exception
- Select table cell 1 and use Column → Move after – the cell disappears
Original description:
Steps to reproduce:
- go to https://www.mediawiki.org/wiki/Manual:Hooks
- edit in VE (I did it as an anonymous user; I get a different error when logged in, but that might be a gadget issue)
- add a new table row below some existing row in the big table.
If the row is not the top of its block the new row appears but you get
VM117:222 Uncaught TypeError: Cannot read property 'getOwner' of null
at <anonymous>:222:903
at Array.map (<anonymous>)
at VeCeMWTableNode.ve.ce.MWTableNode.getTablesorterHeaderCells (<anonymous>:222:860)
at VeCeMWTableNode.ve.ce.MWTableNode.updateSortableHeaders (<anonymous>:222:221)
at later (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0pbg0d6:3)If the row is on the top of the block the new row does not appear and you get
Uncaught TypeError: Cannot read property 'node' of null
at VeUiTableAction.ve.ui.TableAction.insertRowOrCol (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:905)
at VeUiTableAction.ve.ui.TableAction.insert (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:895)
at VeUiSurface.ve.ui.Surface.execute (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:814)
at VeUiCommand.ve.ui.Command.execute (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:841)
at VeUiInsertRowOrColumnContextItem.ve.ui.TableLineContextItem.onActionButtonClick (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:921)
at OoUiButtonWidget.oo.EventEmitter.emit (<anonymous>:8:445)
at OoUiButtonWidget.OO.ui.mixin.ButtonElement.onClick (load.php?debug=false&lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector&version=0pbg0d6:25)
at HTMLAnchorElement.dispatch (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=1sg7377:69)
at HTMLAnchorElement.elemData.handle (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki|mediawiki.legacy.wikibits&only=scripts&skin=vector&version=1sg7377:66)Note the page uses Translate; doesn't seem related though.


