Page MenuHomePhabricator

VisualEditor: [Regression pre-wmf20] TOC widget doesn't tear itself down correctly, throws Cannot call method 'teardown' of undefined while trying to save a page on Betalabs
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE
2.Add a text
3.Try to Save the page

Observed Result:
An error appears : Uncaught TypeError: Cannot call method 'teardown' of undefined
The page seems to be in readmode but the cursor still appears on the page

See the screenshot attached

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/wiki/Toc_issue


Version: unspecified
Severity: normal

Attached:

Screen_Shot_2014-03-21_at_10.44.34_AM.png (734×1 px, 127 KB)

Details

Reference
bz62934

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:52 AM
bzimport set Reference to bz62934.

This error has to do with code that looks like this:

if ( this.surface.mwTocWidget ) {

this.mwTocWidget.teardown();

}

which needs to be rewritten to look like:

if ( this.surface.mwTocWidget ) {

this.mwTocWidget.surface.teardown();

}

Oops... I meant:

if ( this.surface.mwTocWidget ) {

this.surface.mwTocWidget.teardown();

}

Change 120070 had a related patch set uploaded by Jforrester:
Fix a typo that causes crashes when using the wrong symbol for mwTocWidget

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

Change 120070 merged by jenkins-bot:
Fix a typo that causes crashes when using the wrong symbol for mwTocWidget

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