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.
Version: unspecified
Severity: trivial
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.
Version: unspecified
Severity: trivial
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.
(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.
The original issue was never reproduced, and the follow-up discussion about immediately aborted requests was apparently addressed in 2015, in rEVED5d8108f229b8: Increase user-input delay in MediaSearchWidget.