Pull Request for Issue # .
This Pull Request (PR) adds a missing return statement to the upload
function in file administrator/components/com_joomlaupdate/controllers/update.php
.
Code review should be enough, but if you want to make a real test ...
Because it is not easy to cause one of the exceptions in function upload
of the Joomla Update model, add a line as follows to throw an exception just at the beginning of the function, e.g. here https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_joomlaupdate/models/default.php#L941
throw new RuntimeException('THIS IS A TEST', 500);
On a clean current staging or recent 3.9 nightly build or a 3.9.19, login to backend and go to "Components -> Joomla Update".
Select any file for upload.
Result: See section "Actual result BEFORE applying this Pull Request" below.
Apply the patch of this PR.
Repeat steps 2 and 3.
Result: See section "Expected result AFTER applying this Pull Request" below.
First a 403 "Access forbidden" error is shown.
After that when navigating or using the "Back to Control Panel" button, the alert with the exception message is shown.
The alert with the exception message is shown on the Joomla Update Component page. There is no 403 "Access forbidden" error.
None.
When doing the test with one of the language strings COM_INSTALLER_MSG_...
used in one of the exceptions thrown in that function, you will see that these language strings are not trantlated. This is a separate issue not within the scope of this PR. I will later check if there is already an issue or not.
What remains to be clarified is: Shall we make com_joomlaupdate load the strings from com_installer, or shouldn't we better duplicate the necessary strings into the com_joomlaupdate language file and change their name so we have COM_JOOMLAUPDATE_MSG_...
? @infograf768 What do you think?
Hmm, now the test buttons are missing in the issue tracker.
Category | ⇒ | Administration com_joomlaupdate |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Closing this one and making a new, identical one ... hopefully I'll be more lucky with the issue tracker. Don't have the time now to open an issue for the tracker.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-01 17:30:09 |
Closed_By | ⇒ | richard67 |
For some reason I don't see this PR in the issue tracker :-(solved.