? ? ? Pending

User tests: Successful: Unsuccessful:

avatar asika32764
asika32764
11 Nov 2017

Add upload progress so user can see the upload percentage like before.

p-2017-11-12-002

Improve error handler so user will get message if PHP raise fatal error without standard JSON format or HTTP error status.

p-2017-11-12-003

avatar asika32764 asika32764 - open - 11 Nov 2017
avatar asika32764 asika32764 - change - 11 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2017
Category Administration com_installer Language & Strings Front End Plugins
avatar asika32764 asika32764 - change - 11 Nov 2017
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 11 Nov 2017
Category Administration com_installer Language & Strings Front End Plugins Administration Language & Strings Front End Plugins
avatar asika32764 asika32764 - change - 11 Nov 2017
Title
[3.x] Add Progress to Extension Installer and Improve Error Handler
[3.x][Installer] Add upload progress and improve error handling
avatar asika32764 asika32764 - edited - 11 Nov 2017
avatar brianteeman
brianteeman - comment - 11 Nov 2017

It would be nice if this was accessible there are lots of accessible progress bar examples online

avatar asika32764
asika32764 - comment - 12 Nov 2017

@brianteeman Add accessible.

@Fedik Use Joomla.renderMessages()

2809b93 12 Nov 2017 avatar asika32764 tabs
ad82d32 12 Nov 2017 avatar asika32764 tabs
avatar alikon alikon - test_item - 12 Nov 2017 - Tested successfully
avatar alikon
alikon - comment - 12 Nov 2017

I have tested this item successfully on b82544e


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Nov 2017

@asika32764 how to get "fatal error without standard JSON format or HTTP error status" to test PR?


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

avatar asika32764
asika32764 - comment - 12 Nov 2017

Actually I don't know. Maybe return a XML output. This case should never happened.

In this PR, all response with HTTP 200 will go to done() method, but the PHP post_max_size error is unable to catch and returned with JSON and HTTP 200 status:

p-2017-11-12-005

If jQuery try to parse JSON but fail, it will go to error() method. And if response is HTTP 4xx-5xx status will go error() too. I handled the error.responseText for any PHP fatal error and error.responseJSON for standard JSON output, so it should has no other cases we will get.

avatar asika32764
asika32764 - comment - 12 Nov 2017

@franz-wohlkoenig Sorry, I misunderstand what you asked. The "fatal error without standard JSON format or HTTP error status" is the post_max_size issue.

Set php.ini post_max_size to a small value and upload a big file, you will get error message. Before this PR, the uploader will return no message.

If you upload an extension with fatal error in it's install script, this PR will also show the error message. Before this PR it will lose respond and running forever.

avatar Quy
Quy - comment - 12 Nov 2017

This works with drag and drop, but not with Or browse for file. Is this intentional?

avatar asika32764
asika32764 - comment - 12 Nov 2017

Yes, Or browse for file use file input and post form to upload package. While the drag and drop use ajax (because JS cannot insert value to file input).

avatar Quy
Quy - comment - 18 Nov 2017

On a local install, the progress bar moves to 100% very quickly, and then takes about 10 seconds to complete. So this is an upload indicator only and not an installing indicator too?

avatar asika32764
asika32764 - comment - 18 Nov 2017

Yes, it is only uploading indicator. Joomla didn't implement the installing indicator interface now.

avatar Quy
Quy - comment - 18 Nov 2017

In Microsoft Edge 41.16299.15.0 on Windows 10, you don't see the progress bar until the very end. Also, should the % be next to the number without the space?

edge-upload

avatar brianteeman
brianteeman - comment - 18 Nov 2017

good spot. yes it would read better without the space between the number and the &

avatar joomla-cms-bot joomla-cms-bot - change - 19 Nov 2017
Category Administration Language & Strings Front End Plugins Administration com_installer Language & Strings Front End Plugins
avatar joomla-cms-bot joomla-cms-bot - change - 19 Nov 2017
Category Administration Language & Strings Front End Plugins com_installer Administration Language & Strings Front End Plugins
avatar asika32764
asika32764 - comment - 19 Nov 2017
  • Removed space
  • Added installing progress after uploaded. See:

up-pro


@Quy About the Edge issue, it is a known bug that MS haven't fixed it. See:

avatar Quy Quy - test_item - 20 Nov 2017 - Tested successfully
avatar Quy
Quy - comment - 20 Nov 2017

I have tested this item successfully on a00243c


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

avatar asika32764
asika32764 - comment - 11 May 2018

ok

avatar twister65
twister65 - comment - 23 Sep 2018

I have tested this item ? unsuccessfully on 7b6ed58

I do not have an alert popup when the package size exceeds the upload_max_filesize value.
Nothing happening, I have only this message : "No Install Type Found".
This problem is recurring on my host where the upload_max_filesize is set to 2Mo.
Great PR, but it does not work as expected.


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

avatar twister65 twister65 - test_item - 23 Sep 2018 - Tested unsuccessfully
avatar asika32764
asika32764 - comment - 20 Nov 2018

@twister65

The test case with error message is post_max_size.

PHP won't catch upload_max_size error, it will still run process without any uploaded file, so Joomla cannot find extension package file and return a No Install Type Found message.

See #18554 (comment)

avatar asika32764
asika32764 - comment - 20 Nov 2018

At here we use message instead of alert popup.
#18554 (comment)

avatar twister65
twister65 - comment - 1 Dec 2018

@asika32764 , if I set post_max_size to 2 MB, and I upload a file larger than 2 MB. Then the message is "No Install Type Found" and there is no alert popup. This message is not relevant.

avatar asika32764
asika32764 - comment - 1 Dec 2018

Then the message is "No Install Type Found" and there is no alert popup.

This is expected behavior,the default error message should show as Joomla message, not popup.

This PR try to catch some PHP error which Joomla cannot catch and notify user, without this PR, the uploader will only infinite loop without any response.

The popup screenshot you see in first post is no longer used, we use message box now. See #18554 (comment)

This message is not relevant.

This message is default Joomla install error message, not belongs to this PR.

avatar twister65
twister65 - comment - 1 Dec 2018

I have tested this item successfully on 7b6ed58


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

avatar twister65 twister65 - test_item - 1 Dec 2018 - Tested successfully
avatar Quy Quy - change - 1 Dec 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 1 Dec 2018

RTC


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

avatar asika32764 asika32764 - change - 2 Dec 2018
Labels Added: ?
avatar infograf768
infograf768 - comment - 2 Dec 2018

I have tested this item successfully on 5a68c03


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

avatar infograf768 infograf768 - test_item - 2 Dec 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 2 Dec 2018

As the last change is just cosmetic, let's keep this as RTC.

avatar mbabker mbabker - change - 12 Dec 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-12-12 05:43:58
Closed_By mbabker
avatar mbabker mbabker - close - 12 Dec 2018
avatar mbabker mbabker - merge - 12 Dec 2018

Add a Comment

Login with GitHub to post a comment