Page MenuHomePhabricator

EditWarning notification not shown in 1.25 installation
Closed, ResolvedPublic


I do not get warnings when leaving edit pages. Tested on several wikis with different skins.

See also

Event Timeline

StasR created this task.Jun 15 2015, 11:03 PM
StasR raised the priority of this task from to Needs Triage.
StasR updated the task description. (Show Details)
StasR added a subscriber: StasR.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 15 2015, 11:03 PM
Aklapper triaged this task as Low priority.Jun 16 2015, 9:30 AM

Low priority? Hmm... (

Every day people lose their edits because of a faulty mouse movements

If there are more reports of such problems, please feel free to link them.
(Also feel free to look at existing open tasks with higher priorities to compare.)

With which browsers and browser versions was this tested?

I've tried but cannot reproduce.
Tested in linux with Firefox 38 and Chromium 37, logged-in and logged-out, on mw:Sandbox and en:WP:Sandbox
If I try to close the tab or the window, both give me the "Are you sure you want to leave?" browser warning.
If I log-in, and disable the userpreference for "Warn me when I leave an edit page with unsaved changes", then the browser warning is successfully disabled.

StasR added a comment.EditedJun 16 2015, 9:01 PM

Win 7
Firefox 38.0.5
Chrone 43.0.2357.124
Opera 30.0.1835.59

The problem is in MW 1.25, Wikipedia works fine.

StasR added a comment.Jun 16 2015, 9:09 PM

MW 1.24.2 is also working correctly

Is that a public wiki (address welcome) that someone else could try to reproduce on?

StasR added a comment.EditedJun 17 2015, 9:17 AM - MW 1.25.1

other wikis (including MW 1.24) accessible from the outside but addresses can only report by mail

Aklapper renamed this task from EditWarning does not work in MW 1.25 to PostEdit notification not shown in 1.25 installation.Jun 17 2015, 11:17 AM
Aklapper set Security to None.

Confirming for the public link. I made two anonymous edits on that wiki; no JS errors displayed either in the browser console.

Works with debug=true, so the module is known and working for the installation.

Maybe a server cache problem around the ResourceLoader

Umherirrender renamed this task from PostEdit notification not shown in 1.25 installation to EditWarning notification not shown in 1.25 installation.Jun 17 2015, 8:55 PM
TheDJ added a subscriber: TheDJ.Jul 5 2015, 8:34 PM

No, this is because user.options is not marked as a dependency for this module. I'll fix this and we should consider backporting the fix.

Change 222979 had a related patch set uploaded (by TheDJ):
editWarning: Decleare dependency on user.options

Change 222979 merged by jenkins-bot:
editWarning: Declare dependency on user.options

TheDJ added a comment.EditedJul 6 2015, 11:06 AM

So what I'm actually seeing here, is that the mw.user.options.set with the defaults happens AFTER the mw.user.options.get for this option.

I suspect this behavior started occurring when we introduced user.defaults, it's actually the 2nd time that I have seen it now, though I don't remember where I saw it before... This is especially interesting, since the .get is inside a jQuery dom ready.

It seems that the defaults module is bottom loaded on demand by the loader, instead of top loaded as user.options is. If there is not a single module that depends on user.options, then the dependency of user.options on user.defaults is basically put last on the queue of RL (alphabetic ordering?), and user.defaults is loaded after any other bottom loaded module.

Now reported as: T104844

Will do the backport to 1.25 tonight, adding the category, so we don't forget...

Change 223152 had a related patch set uploaded (by TheDJ):
editWarning: Declare dependency on user.options

Change 223152 merged by jenkins-bot:
editWarning: Declare dependency on user.options

Umherirrender closed this task as Resolved.Sep 27 2015, 7:17 PM
Umherirrender assigned this task to TheDJ.