Last modified: 2011-09-07 19:23:18 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 T30198, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28198 - data.query is undefined js error
data.query is undefined js error
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://commons.prototype.wikimedia.or...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-23 00:27 UTC by Michael Dale
Modified: 2011-09-07 19:23 UTC (History)
2 users (show)

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


Attachments

Description Michael Dale 2011-03-23 00:27:24 UTC
Once you upload your file, release rights, then get to describe. If you put a ] in the categories input box invokes the error "data.query" is undefined

you should ( of course ) check properties before assuming success. ie: instead of line 135 of jquery.mwCoolCats.js 
var pages = data.query.allpages;
 
// you should do something like:
if( data &&  data.query && data.query.allpages ){
    var pages = data.query.allpages; 
} else{
   // error handling goes here. 
}

There are several other places in the code base where you make assignments of decedent properties without checking for their existence, these should be fixed.
Comment 1 Bugmeister Bot 2011-08-19 19:12:38 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 2 Neil Kandalgaonkar 2011-09-07 19:23:18 UTC
Assumed fixed with mw.Api.category.js which does the right thing.

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


Navigation
Links