? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
16 Oct 2016

Summary of Changes

There are some cases we get some strange message on ajax errors. Thsi happens when, for instance, when we use the new vannila js Joomla.request instead of the jquery ajax methods.

It seems this happens because jQuery ajax error returns different values than plain vanilla js methods do.

This PR intends to make those messages more useful in this contexts.

Testing Instructions

  1. Code review.
  2. You need to make ajax errors to test this. Example:
  3. Set session time to one minute so the keepalive ajax call takes one minute.
  4. Now edit any content in admin and leave the edit view open so keepalive keep running . add the following code in https://github.com/joomla/joomla-cms/blob/3.7.x/administrator/components/com_ajax/ajax.php#L11 to make an ajax error
$app = JFactory::getApplication();
$app->setHeader('Content-Type', 'application/json; charset=utf-8');
$app->sendHeaders();
echo jason_encode('a');
$app->close();
die();
  • Wait for keepalive and you will get something like this image
  • Now apply patch, clear browsers cache and repeat the same steps. You should get soemthing like this image ### Documentation Changes Required

None.

@Fedik please review this, as you were the one that created the new Joomla.request method, and i could be missing something here.

@dgt41 please check too.

avatar andrepereiradasilva andrepereiradasilva - open - 16 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 16 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2016
Category JavaScript
avatar andrepereiradasilva andrepereiradasilva - change - 16 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 16 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 16 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 16 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 16 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 16 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 16 Oct 2016
avatar Fedik
Fedik - comment - 16 Oct 2016

thanks! looks good.
I try to test in next days

avatar Fedik Fedik - test_item - 17 Oct 2016 - Tested successfully
avatar Fedik
Fedik - comment - 17 Oct 2016

I have tested this item successfully on 8a15b13


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12437.

avatar andrepereiradasilva andrepereiradasilva - edited - 25 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 29 Oct 2016
Title
[3.7.x] Make js ajax error messages more useful when using Joomla.request
Make js ajax error messages more useful when using Joomla.request
avatar joomla-cms-bot joomla-cms-bot - change - 29 Oct 2016
Title
[3.7.x] Make js ajax error messages more useful when using Joomla.request
Make js ajax error messages more useful when using Joomla.request
Labels Added: ?
avatar brianteeman brianteeman - change - 29 Oct 2016
Labels Removed: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

@dgt41 can you check this one please?

avatar dgt41 dgt41 - test_item - 29 Oct 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 29 Oct 2016

I have tested this item successfully on 8a15b13

Already using it in J4 ?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12437.

avatar dgt41 dgt41 - change - 29 Oct 2016
Status Pending Ready to Commit
avatar dgt41
dgt41 - comment - 29 Oct 2016

RTC

avatar joomla-cms-bot joomla-cms-bot - change - 29 Oct 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 3 Nov 2016
Milestone Added:
avatar brianteeman brianteeman - change - 3 Nov 2016
The description was changed
avatar rdeutz rdeutz - change - 4 Nov 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-11-04 09:04:15
Closed_By rdeutz
avatar rdeutz rdeutz - close - 4 Nov 2016
avatar rdeutz rdeutz - merge - 4 Nov 2016
avatar rdeutz rdeutz - reference | 24955e1 - 4 Nov 16
avatar rdeutz rdeutz - merge - 4 Nov 2016
avatar rdeutz rdeutz - close - 4 Nov 2016

Add a Comment

Login with GitHub to post a comment