Page MenuHomePhabricator

Uncaught TypeError: Cannot read property 'query' of null
Open, LowestPublic

Description

This bug doesn't seems to happen often, but I've noticed the following error after trying to submit a new reply to a thread:

Uncaught TypeError: Cannot read property 'query' of null

I was using Google Chromium 12.0.742.112 (90304) Ubuntu 11.04.


Version: unspecified
Severity: normal

Details

Reference
bz30154

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:47 PM
bzimport set Reference to bz30154.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r created this task.Jul 31 2011, 5:36 PM

shealen.clare wrote:

This bug has not been touched in at least six months. With this in mind, I've been asked by the bugmeister to bump this bug's priority down from "High". Concerns can be addressed to mah@everybody.org.

Can you still reproduce this bug? If so, can you find the line it occurs on?

Not really. But since there are only 5 occurrences of ".query" at
http://pt.wikibooks.org/w/extensions/LiquidThreads/lqt.js

and all of them occur in a code of the form

$j.get( mw.util.wikiScript( 'api' ), ...,
function(data) {

		...
		data.query.threads
		...

}, 'json' );

I think this would probably not happen if the 'mediawiki.api' module was used to handle the API requests. Indeed, that module has checks for 'data' being undefined and API errors:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=resources/mediawiki.api/mediawiki.api.js;h=cf7443f3b3bfa35e6c52a7043e76a2f17c52adf8;hb=HEAD#l160

This would probably help with bug 28132 as well.

(In reply to comment #3)

I think this would probably not happen if the 'mediawiki.api' module was used
to handle the API requests. Indeed, that module has checks for 'data' being
undefined and API errors:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;
f=resources/mediawiki.api/mediawiki.api.js;
h=cf7443f3b3bfa35e6c52a7043e76a2f17c52adf8;hb=HEAD#l160
This would probably help with bug 28132 as well.

Doing this as part of Gerrit change 50857

Jorm removed a subscriber: Jorm.Dec 26 2015, 7:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 26 2015, 7:28 PM
Jdforrester-WMF lowered the priority of this task from Normal to Lowest.Aug 4 2016, 11:34 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

LiquidThreads has been replaced by StructuredDiscussions on all Wikimedia production wikis (except one, which will be done soon). It is no longer under active development or maintenance, so I'm re-classifying all open LQT tasks as "Lowest" priority.