Last modified: 2014-11-10 11:22:25 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 T75141, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 73141 - VisualEditor: Insert media dialog appears to immediately abort request
VisualEditor: Insert media dialog appears to immediately abort request
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Lowest trivial
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-07 17:35 UTC by etonkovidova
Modified: 2014-11-10 11:22 UTC (History)
9 users (show)

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


Attachments

Description etonkovidova 2014-11-07 17:35:36 UTC
In test2 and production(betalabs does not display the error).

In VE, open any page for Edit and insert Media - "Uncaught TypeError: undefined is not a function" is immediately displayed.
Comment 1 Roan Kattouw 2014-11-07 18:00:13 UTC
Works fine for me in production (enwiki), test2 and beta labs.
Comment 2 Roan Kattouw 2014-11-07 19:48:54 UTC
Elena showed me that if you open the media dialog on a new page after typing some text and going to a new paragraph, the usual jQuery JSONP abort error thing happens, and it consistently happens every time you open the dialog. This probably means we are sending a request and then immediately aborting it.
Comment 3 Moriel Schottlender 2014-11-07 19:53:38 UTC
(In reply to Roan Kattouw from comment #2)
> Elena showed me that if you open the media dialog on a new page after typing
> some text and going to a new paragraph, the usual jQuery JSONP abort error
> thing happens, and it consistently happens every time you open the dialog.
> This probably means we are sending a request and then immediately aborting
> it.

We are immediately sending a request every time the search input is changed. In the case of opening the insert dialog, the search input should get the page title, so a request is immediately sent with that. If the request is sent and is immediately aborted even if no other detail was changed (so, if you didn't change the search input at all) then maybe there's an issue with the way the input is updated. But then, the search appears, so the request doesn't seem to be cancelled immediately.

I'm not entirely sure what goes on there with the JSONP failures, but if this is about cancelling requests before they're done, I'm not entirely sure we can do anything about it -- requests are sent when the input is changed, which means that when the user types, we send each request on keystroke. If you're writing a whole word of 5 letters, then you'll get 4 cancelled requests and 1 completed one.

Changing this behavior would mean adding some "search" button to do the search on click rather than instantaneously on keystroke, and that's not the behavior we want.

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


Navigation
Links