Page MenuHomePhabricator

Uncaught TypeError: undefined is not a function from mediawiki.action.edit.stash.js
Closed, ResolvedPublic

Description

https://phabricator.wikimedia.org/F180359

each time I type a character in the editing window on commons :(

Event Timeline

aude created this task.Jun 17 2015, 7:34 PM
aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 17 2015, 7:34 PM
aude added a comment.Jun 17 2015, 7:49 PM

this is especially a problem if I backspace/delete some characters (e.g. the date) and then start typing another date.

here i am just doing cut & paste of a template, replacing the description and date.

ori added a subscriber: ori.Jun 17 2015, 7:51 PM

Caused by https://gerrit.wikimedia.org/r/#/c/217293/ . The reason the code did not use api.postWithToken is that that returns a promise, which is not abortable.

Change 219005 had a related patch set uploaded (by Alex Monk):
Revert "StashEdit: Use postWithToken"

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

Change 219007 had a related patch set uploaded (by Ori.livneh):
Revert "StashEdit: Use postWithToken"

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

Krenair closed this task as Resolved.Jun 17 2015, 7:57 PM
Krenair assigned this task to ori.
Krenair added a subscriber: Krenair.

Change 219005 merged by jenkins-bot:
Revert "StashEdit: Use postWithToken"

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

Rillke added a subscriber: Rillke.Jun 17 2015, 8:11 PM

Caused by https://gerrit.wikimedia.org/r/#/c/217293/ . The reason the code did not use api.postWithToken is that that returns a promise, which is not abortable.

While promises do not have to be abortable, it would be technically possible to extend the promise returned api.postWithToken() with an .abort() function.

66d568958317b could have documented (comment in code) the fact @ori mentioned.

TheDJ added a subscriber: TheDJ.Jun 18 2015, 12:21 AM
TheDJ added a subscriber: Legoktm.EditedJun 18 2015, 12:30 AM

Grrrr, my bad. I had a local followup for this module, that rewrote it to use jquery.throttle-debounce (so did not need abort). Probably should have squashed that into a single change, instead of trying to split it up.

BTW: Please do mention or subscribe authors and reviewers of original changes. This totally went unnoticed for me, if it were not for the fact that i happened to go through my list of recently closed changes for totally unrelated reasons.

CC. @Legoktm

Gerrit is supposed to send you a notification for the revert comment on https://gerrit.wikimedia.org/r/#/c/217293/

Yeah, but that goes into a high signal to noise ratio mailbox, where if i didn't mark all previous emails as read, it's very easy to miss.. A new phab ticket is much more noticeable (because it starts a new email thread).

Change 219007 merged by Ori.livneh:
Revert "StashEdit: Use postWithToken"

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

Ricordisamoa set Security to None.
Ricordisamoa added a subscriber: Ricordisamoa.