Page MenuHomePhabricator

Errors from and via dieUsage, doneCallback, handleAJAXSave are not shown. Should doneCallback better show error messages directly?
Open, LowPublic

Description

This bug was initially created as a clone of Bug #29200; Brion wrote:

Workarounds for failures to handle error conditions in the JavaScript code exist.

The error info from the dieUsage appears to perfectly correctly make it back to
the 'doneCallback' function in 'handleAJAXSave' (via the actual call in
liquidThreads.doNewThread ).

However, doneCallback tries to handle error conditions by submitting the same
form as non-Ajax in the hopes that that code path will show an error as well,
which apparently isn't ending up having the expected results.

It should instead probably show the error message directly.....?

Does this need more general or more specific handling for particular kinds of errors that we can't report back cleanly through this interface?


Version: unspecified
Severity: major
URL: http://www.mediawiki.org/wiki/Extension:LiquidThreads

Details

Reference
bz29390

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:33 PM
bzimport set Reference to bz29390.
bzimport added a subscriber: Unknown Object (MLST).
Wikinaut created this task.Jun 14 2011, 5:45 AM

for debugging it may help to add dump() (javascript version of PHP print_r ) see
http://www.openjs.com/scripts/others/dump_function_php_print_r.php

in callback handler of apiRequest function

/**

  • Function : dump()
  • Arguments: The data - array,hash(associative array),object
  • The level - OPTIONAL
  • Returns : The textual representation of the array.
  • This function was inspired by the print_r function of PHP.
  • This will accept some data as the argument and return a
  • text that will be a more readable version of the
  • array/hash/object that is given.
  • Docs: http://www.openjs.com/scripts/others/dump_function_php_print_r.php */

Andrew,

I need your help to overcome this problem of not having error messages in lqt: the modules do not show error alert messages; they appear to get caugth somewhere else. You can try this for example by intentionally insertings dieUsage() calls.

The lqt.js already has a lot of "FIXME" comments related to error handling, so it looks as if something's is broken or otherwise going wrong as indicated by Brion in the first comment.

The way error handling is done at the moment is that if there is an error, it submits the request through the non-Javascript POST mechanism, and any error will be displayed on the result page. It's a quick fix, but it's effective. If you like, you can have the errors show up with JavaScript.

(In reply to comment #3)

The way error handling is done at the moment is that if there is an error, it
submits the request through the non-Javascript POST mechanism, and any error
will be displayed on the result page. It's a quick fix, but it's effective. If
you like, you can have the errors show up with JavaScript.

At the moment, no errors are shown for unknown reason when there are some. See Brion's comment ( https://bugzilla.wikimedia.org/show_bug.cgi?id=29390#c0 )

(In reply to comment #4)

At the moment, no errors are shown for unknown reason when there are some.
See Brion's comment ( https://bugzilla.wikimedia.org/show_bug.cgi?id=29390#c0 )

Is that still the case?

Clarification: I found this during debugging LiquidThreads in 2011: I wanted to fix the problem, that the AJAX loading "spinner" is oftern not cleared, for example when you move a Lqt thread.

The debugging was difficult, and I stopped when I found that errors are not correctly treated inside Lqt. Honestly, I gave up. The Wikimedia Foundation told me several times, that a professional person is working on LiquidThreads - I asked several times for evidence of some outcome of this project, but their answer was always like cookie-licking "yes we working on that".

I gave up with LiquidThreads.

Adding Krenair in case he's interested in fixing this.

Jorm removed a subscriber: Jorm.Dec 26 2015, 7:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 26 2015, 7:24 PM
Jdforrester-WMF lowered the priority of this task from Low 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.

Nemo_bis raised the priority of this task from Lowest to Low.Aug 5 2016, 7:37 AM