Last modified: 2014-07-18 12:33:06 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 T31390, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29390 - Errors from and via dieUsage, doneCallback, handleAJAXSave are not shown. Should doneCallback better show error messages directly?
Errors from and via dieUsage, doneCallback, handleAJAXSave are not shown. Sho...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Extensi...
:
Depends on: 29200
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-14 05:45 UTC by T. Gries
Modified: 2014-07-18 12:33 UTC (History)
4 users (show)

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


Attachments

Description T. Gries 2011-06-14 05:45:26 UTC
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?
Comment 1 T. Gries 2011-06-15 05:45:57 UTC
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
 */
Comment 2 T. Gries 2011-06-15 07:15:51 UTC
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.
Comment 3 Andrew Garrett 2011-06-16 02:23:16 UTC
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.
Comment 4 T. Gries 2011-06-16 06:22:47 UTC
(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 )
Comment 5 Andre Klapper 2013-03-26 14:50:33 UTC
(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?
Comment 6 T. Gries 2013-08-30 06:26:35 UTC
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.
Comment 7 James Forrester 2013-08-31 14:10:36 UTC
Adding Krenair in case he's interested in fixing this.

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


Navigation
Links