Page MenuHomePhabricator

VisualEditor: [Regression pre-wmf14] Save button in save dialog remains active while save is in progress and throws "Uncaught TypeError: Cannot read property '$saveOptions' of null"
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE
2.Make an edit
3.Click on the "Save Page"
4.While the saving is in progress,keep on clicking on the "Save Page" button on the Save dialog

Observed Result:
The following error appears in the console:

Uncaught TypeError: Cannot read property '$saveOptions' of null


Version: unspecified
Severity: minor

Attached:

Details

Reference
bz68073

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:35 AM
bzimport set Reference to bz68073.
Ryasmeen created this task.Jul 15 2014, 9:26 PM

Seems that I can only get "Uncaught TypeError: Cannot read property 'messages' of null " on my local machine

Change 146810 had a related patch set uploaded by Alex Monk:
Don't allow document save if we're already tearing down the surface

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

Change 146810 merged by jenkins-bot:
Don't allow document save if we're already tearing down the surface

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

I don't think that fixed it, unfortunately. But I can't reproduce this error locally.

I can reproduce both the UI as well as the logic problem.

Both the "Review your changes" and the "Save page" buttons in the save dialog remain clickable.

Their apparent state looks clickable, their response to clicking is appeared pressed, and the result is the event handler firing internally.

The exception usually doesn't happen until after the first save attempt has finished and the view goes back to "read" mode, but it does throw:

ve.init.mw.ViewPageTarget.prototype.onSave = function ( .. ) {
if ( !this.pageExists || this.restoring ) {

		..

} else {

		if ( mw.page.watch && mw.page.watch.updateWatchLink ) {
			watchChecked = this.saveDialog.$saveOptions

.. ^

Does this still happen? I was able to replicate it on deployment-prep at the time (not on my local machine, as I said), but now I can't...

I get "Uncaught TypeError: Cannot read property 'getModel' of null" when trying to load VE after it's been saved (again, only on deployment-prep, not my local machine), but that seems unrelated.

Going to mark as FIXED but please re-open if there's an issue.

Verified the fix in Betalabs

Verified the fix in test2

Verified the fix in production