RTC bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar BrainforgeUK
BrainforgeUK
13 Nov 2023

Avoid fatal PHP error on malformed manifest.

Pull Request for Issue # .

Summary of Changes

Avoid exception when presented with a malformed manifest.

Testing Instructions

Install a package without any extensions.

Actual result BEFORE applying this Pull Request

Get fatal PHP exception.
count(): Argument #1 ($value) must be of type Countable|array, null given

Expected result AFTER applying this Pull Request

Get message:
JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [x ] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [ x] No documentation changes for manual.joomla.org needed

avatar BrainforgeUK BrainforgeUK - open - 13 Nov 2023
avatar BrainforgeUK BrainforgeUK - change - 13 Nov 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2023
Category Libraries
avatar laoneo
laoneo - comment - 14 Nov 2023

Do you have actually a package to test this?

avatar BrainforgeUK
BrainforgeUK - comment - 14 Nov 2023

pkg_test.zip

Without the change this throws a system error.
Look at errors in browser console for more detail.

With the change get an unhelpful JSON error.
This is another Joomla issue I am not attempting to resolve here - less confusing if solution part of another pull request.
Refresh the screen and get the proper error message should have received instead of the JSON error.

avatar laoneo laoneo - test_item - 14 Nov 2023 - Tested successfully
avatar laoneo
laoneo - comment - 14 Nov 2023

I have tested this item ✅ successfully on c9428c9

Installed the empty package and got a proper error message and a normal one (DPCalendar), which still worked.


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

avatar laoneo laoneo - change - 14 Nov 2023
Title
Update PackageAdapter.php
[5.0] Show proper error message when package is installed with no extensions
avatar laoneo laoneo - edited - 14 Nov 2023
avatar BrainforgeUK BrainforgeUK - change - 14 Nov 2023
Labels Added: PR-5.0-dev
avatar BrainforgeUK
BrainforgeUK - comment - 14 Nov 2023

Following on from my comment about the JSON error I've had a look at that.
Turns out its in the same area as my changes for this PR (and not in Javascript) so I've added the fix for that here.

avatar laoneo laoneo - test_item - 14 Nov 2023 - Tested successfully
avatar laoneo
laoneo - comment - 14 Nov 2023

I have tested this item ✅ successfully on 9638a7e

Tested again a valid and empty package, now no JS errors anymore.


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

avatar viocassel viocassel - test_item - 15 Nov 2023 - Tested successfully
avatar viocassel
viocassel - comment - 15 Nov 2023

I have tested this item ✅ successfully on 9638a7e


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

avatar Quy Quy - change - 15 Nov 2023
Status Pending Ready to Commit
avatar BrainforgeUK BrainforgeUK - change - 10 Dec 2023
Labels Added: Updates Requested bug
avatar Quy Quy - change - 15 Dec 2023
Labels Added: RTC
Removed: Updates Requested
avatar bembelimen bembelimen - close - 16 Dec 2023
avatar bembelimen bembelimen - merge - 16 Dec 2023
avatar bembelimen bembelimen - change - 16 Dec 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-12-16 06:40:17
Closed_By bembelimen
avatar bembelimen
bembelimen - comment - 16 Dec 2023

Thx

Add a Comment

Login with GitHub to post a comment