Last modified: 2013-11-23 23:20:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48456, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46456 - [Regression] VisualEditor: Error in load() leaves page in dimmed state (Uncaught TypeError: Cannot call method 'removeAllListeners' of null)
[Regression] VisualEditor: Error in load() leaves page in dimmed state (Uncau...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Normal normal
: VE-deploy-2013-04-01
Assigned To: Krinkle
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-22 17:31 UTC by Krinkle
Modified: 2013-11-23 23:20 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2013-03-22 17:31:49 UTC
Steps to reproduce issue:
* MediaWiki + VisualEditor (no Parsoid)
* Edit page (dims the page while loading)
* Error pops up (parsoidserver-http-curl-error)
* Cancel

Expected:
 Page undims.

Actual:
 Page still dimmed.
Comment 1 Krinkle 2013-03-22 18:13:28 UTC
Caused by I7769bd5a5b79f1ab36f258ef9f2be583ca503ce6.

In the refactoring Trevor moved the initialisation of the DOM element for the save/cancel buttons from the ve.init.mw.ViewPageTarget constructor to ve.init.mw.ViewPageTarget#setupToolbarButtons, which isn't called until after a successful load.

So, when #load() is called from #activate() and fails a loadError is emitted. onLoadError then calls #deacativate() which calls #tearDownToolbarButtons()

But tearDownToolbarButtons is unable to call this.toolbarCancelButton.removeAllListeners because the button doesn't exist yet because setupToolbarButtons was never called.
Comment 2 Krinkle 2013-03-22 18:22:06 UTC
Change-Id: I91ad2b110c2c523a4bb367407e3f33a953328ab4

That should fix it for now (quick fix). I'm now going to look into how much of this can be refactored to avoid this in the first place. It's all a bit too fragile.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links