Page MenuHomePhabricator

Javascript error in lqt.js: data.query.threads[threadId] is undefined
Open, LowestPublic

Description

Screenshot of this bug

After I've edited the comment
http://pt.wikibooks.org/wiki/T%C3%B3pico:Wikilivros:Di%C3%A1logos_comunit%C3%A1rios/Imagens_usadas_no_projeto/resposta_%284%29
and changed from it's Firefox tab to another I got the following error in Firebug:

data.query.threads[threadId] is undefined
http://pt.wikibooks.org/w/extensions/LiquidThreads/lqt.js?283y
Line 555

Version: unspecified
Severity: minor
URL: http://pt.wikibooks.org/wiki/T%C3%B3pico:Wikilivros:Di%C3%A1logos_comunit%C3%A1rios/Imagens_usadas_no_projeto/resposta_%284%29

Attached:

LQT_Javascript_Bug.png (288×1 px, 43 KB)

Details

Reference
bz25480

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:16 PM
bzimport set Reference to bz25480.
bzimport added a subscriber: Unknown Object (MLST).

Maybe it should be added a test such as

if (typeof data.query.threads[threadId] !== 'undefined') {

...

}

somewhere?

I'd like a way to reproduce this...

I don't remember seeing this again since I reported it, so I can't provide more specific steps to reproduce this.

Anyway, it still seems fragile to access ".content" without checking if "data.query.threads[threadId]" is defined.

There are many places where the code is that fragile. But its important to know what we are fixing.

I vote to this as invalid as it seems to always remain this vague in the future.

edupunk wrote:

I didn't get a screenshot, but I was able to reproduce this (I think, based on the description and my reliance on Google Translate for the Portuguese ;) ) in Firefox. Editing a comment worked fine in Chrome, however attempting to edit a comment on that page in Firefox would refresh the page and delete the entire comment.

Jaime: If you can reproduce it, Firebug or JavaScript error console output is very welcome, plus a link/URL where to reproduce.

Removing "easy" until clear and consistent steps to reproduce are added.

Jdforrester-WMF lowered the priority of this task from Medium to Lowest.Aug 4 2016, 11:35 PM
Jdforrester-WMF subscribed.

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.

Aklapper renamed this task from Javascript error in lqt.js to Javascript error in lqt.js: data.query.threads[threadId] is undefined.Feb 5 2022, 8:03 PM
Aklapper removed a subscriber: wikibugs-l-list.