NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
26 Jan 2020

Pull Request for Issue #27494 (comment).

Requires PR #27570 for the language strings.

Summary of Changes

This Pull Request (PR) adds a check if the selected file is too big to be uploaded with respect to the PHP limits to the "Upload & Install Package" tab of the Extensions Installer.

Testing Instructions

Please wait with testing and reviews. I have to fix drag and drop.
Fixed. Ready for reviews and tests.

Requirements:

  1. npm
  2. PR #27570 for the language strings.

Procedure:

  1. Apply patch of this PR and of PR #27570 .
  2. Run npm run build:js (or npm install if you prefer this).
  3. Clear browser cache to get rid of old cached JS.
  4. Go to administrator/index.php?option=com_installer&view=install and there to tab "Upload Package File".
  5. Drag to the drag and drop area a file which is too big compared to the maximum upload size shown below the file selection.
    Hint: This can be any file, it doesn't necessarily have to be a valid extension package.
    Result: See screenshot in section "Expected result" below. A browser alert is shown telling that the file can't be uploaded because it's too big. The upload is not started.
  6. Select a file which is too big, using the "Or browse for file" button.
    Result: Same as in previous step. A browser alert is shown telling that the file can't be uploaded because it's too big.
  7. Drag to the drag and drop area a file which is not too big compared to the maximum upload size shown below the file selection.
    Result: Uploading of not too big package file using drag and drop still works as well as without this PR.
  8. Finally select another package file which is not too big, using the "Or browse for file" button, and verify that uploading still works.
    Result: Uploading of not too big package file using the "Or browse for file" button still works as well as without this PR.

Expected result

Broswer alert when trying to upload too big file:
installer-file-too-big

Actual result

See #27494 (comment).

  • If post_max_size is big enough but upload_max_size is violated:
    j4_upload-max-filesize-violated_com-installer

  • If upload_max_size is big enough but post_max_size is violated:
    Nothing happens, and PHP error log shows: PHP Warning: POST Content-Length of 22972015 bytes exceeds the limit of 16777216 bytes in Unknown on line 0, referer: ... (with byte figures suitable to your test).

Documentation Changes Required

Nothing special for this PR. The help screens for J4 backend have to be udpated anyway.

avatar richard67 richard67 - open - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jan 2020
Category JavaScript Repository NPM Change Front End Plugins
avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
Title
[4.0] [WiP] Add upload file size check to Extensions Installer Upload & Install Package
[4.0] Add upload file size check to Extensions Installer Upload & Install Package
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
Labels Added: NPM Resource Changed ?
avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67
richard67 - comment - 26 Jan 2020

Please wait with testing and reviews. I have to fix drag and drop.
Fixed. Ready for reviews and tests.

avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67
richard67 - comment - 26 Jan 2020

PR is ready for reviews and tests now.

avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar brianteeman brianteeman - test_item - 26 Jan 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 26 Jan 2020

I have tested this item successfully on 2d1e3d2

tested ok as long as the other pr is merged for the language strings


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

avatar richard67
richard67 - comment - 26 Jan 2020

@brianteeman Again thanks a lot. I've updated the testing instructions to mention the dependency on the other PR.

avatar richard67 richard67 - change - 26 Jan 2020
The description was changed
avatar richard67 richard67 - edited - 26 Jan 2020
avatar jwaisner jwaisner - test_item - 26 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 26 Jan 2020

I have tested this item successfully on 2d1e3d2

With both PRs things are working as expected.


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

avatar richard67
richard67 - comment - 26 Jan 2020

@jwaisner Thanks for testing. Could you test PR #27570 , too?

avatar richard67
richard67 - comment - 26 Jan 2020

We should wait with RTC until the other PR #27570 has RTC, too, or maybe even until that other one is merged, because this PR here depends on that other one.

avatar richard67 richard67 - change - 26 Jan 2020
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 26 Jan 2020

RTC


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

avatar richard67
richard67 - comment - 26 Jan 2020

@wilsonge Please don't merge this without PR #27570 because this one here depends on that.

avatar Quy Quy - change - 1 Feb 2020
Labels Added: ?
avatar Quy Quy - change - 1 Feb 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-02-01 23:59:50
Closed_By Quy
avatar Quy Quy - close - 1 Feb 2020
avatar Quy Quy - merge - 1 Feb 2020
avatar richard67
richard67 - comment - 2 Feb 2020

Thanks.

Add a Comment

Login with GitHub to post a comment