Page MenuHomePhabricator

[Regression?] Cannot add columns to sparse tables in VisualEditor
Closed, ResolvedPublic1 Story Points

Description

Steps to reproduce (experienced in Chromium 54.0.2840.71):

  1. Open a page with a table in VisualEditor (for example https://en.wikipedia.org/wiki/Pushing_Daisies?veaction=edit )
  2. Click on a column header, then on the column menu
  3. Click "Insert before" or "Insert after".

Expected result: A column is inserted.

Actual result: No column is added; the JavaScript console outputs the error "Cannot read property 'cells' of undefined".

I thought this may be related to the Chrome support issue that @Jdforrester-WMF mentioned to me recently, but I noticed that there was also an issue in Firefox (50.0.2), although with a different error in the console: "TypeError: dataMatrixLine is undefined". I'm opening this report so that someone more knowledgeable than me can determine if this is a known issue.

Event Timeline

gpaumier created this task.Dec 8 2016, 2:50 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptDec 8 2016, 2:50 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I just noticed that the two tables I experienced this issue with had either missing or merged cells. Adding the missing cell fixed the issue in the former case (I haven't tried the other one). Sorry for the possibly-useless report. Maybe there should be some better error reporting to inform the user?

It should still work with missing and merged cells, so this is indeed a bug.

Jdforrester-WMF renamed this task from Cannot add columns to tables in VisualEditor to [Regression?] Cannot add columns to sparse tables in VisualEditor.Dec 9 2016, 5:22 PM
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

Probably not a regression as we haven't touched the code. This may be more about an entire row of sparse cells.

Yeah, it's more likely that we missed an edge case in the test suite. But just in case…

DLynch added a subscriber: DLynch.Dec 9 2016, 7:57 PM

This is the same error as T152387 -- so probably the same issue.

Change 326162 had a related patch set uploaded (by DLynch):
ui.TableAction: don't try to add cells if none have been provided

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

Change 326162 merged by jenkins-bot:
ui.TableAction: don't try to add cells if none have been provided

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

Change 326141 had a related patch set uploaded (by Jforrester):
Update VE core submodule to master (33012af)

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

Jdforrester-WMF closed this task as Resolved.Dec 10 2016, 12:10 AM
Jdforrester-WMF assigned this task to DLynch.

Change 326141 merged by jenkins-bot:
Update VE core submodule to master (33012af)

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