Page MenuHomePhabricator

Cannot open VE for a specific page and the error "TypeError: lastSection is undefined" appears in the console
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Go to this page site:http://en.m.wikipedia.beta.wmflabs.org/wiki/22ndoctoberff

Observed Result:
As soon as you open the page, the following error appears in Firefox and there is a lock icon appearing on Edit icon so cannot open VE for it

TypeError: lastSection is undefined

Also , in Chrome the error message is:

TypeError: Cannot read property 'children' of undefined

See the screenshot attached


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-10-22_at_3.14.27_PM.png (744×1 px, 164 KB)

Details

Reference
bz72395

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:59 AM
bzimport set Reference to bz72395.

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/3ycdjooK

Seems to be a bug in the section.js code
Offending line is assignToParent( lastSection.children, section );
Would be good to add a new test case to Section.js

Change 168398 had a related patch set uploaded by Bmansurov:
Fix transforming sections

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

The error has been fixed. However, when I hit the edit button, the editor doesn't just shows part of the page contents. Also, collapsing is not working as intended. I think it might have to do with the way the header elements are used. Maybe needs a separate ticket.

Typo in "the editor doesn't just shows" above. It should read "the editor just shows"

Change 168398 merged by jenkins-bot:
Fix transforming sections

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