Page MenuHomePhabricator

claimview JS error on save
Closed, ResolvedPublic

Description

The way I tab through stuff and create statements, sometimes I accidentally hit "save" twice. It says "Saving... Saving..."

I am now also getting a JS error, though not always.

mw.Api error: createclaim-save-failed Object {error: Object} load.php:11129

Uncaught TypeError: Cannot call method 'enable' of undefined jquery.wikibase.claimview.js:428

In this line, the .data( 'wb-toolbar' ) returns undefined.

this.$toolbar.find( '.wb-ui-toolbar' ).data( 'wb-toolbar' ).enable();

I suppose people shouldn't hit save twice, so perhaps it's not critical it be fixed *right now* but would be good if the code handled this nicer without any errors.


Version: unspecified
Severity: normal

Details

Reference
bz44641

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:32 AM
bzimport set Reference to bz44641.
bzimport added a subscriber: Unknown Object (MLST).

This is because each time hitting enter it will trigger an API call even though it did already. Not that critical since the save will still be performed, not even the UI gets broken by this.

wikidata-bugs wrote:

Change Iafe8540f: (bug 44641) Preventing keydown event when disabled

Verified in Wikidata demo sprint 32

Restricted Application added a subscriber: StudiesWorld. · View Herald Transcript