-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.4] #38840 Module uninstallation error handling #38891
base: 4.4-dev
Are you sure you want to change the base?
Conversation
## Summary of changes Gracefully handle missing client="site" in module manifest. See joomla#38840 ## Testing Instructions Install a module with this in the manifest: <extension type="module" method="upgrade" version="2.5"> Instead of: <extension type="module" client="site" method="upgrade" version="2.5"> Then try to uninstall it.
@BrainforgeUK Please fix the code style errors reported by drone here: https://ci.joomla.org/joomla/joomla-cms/58326/1/8 . We meanwhile use spaces (4 for each level) for indentation and not tabs like in past. |
@BrainforgeUK It seems the description is missing some details which are not shown because they contain code or markup. Please quote them so that they are shown, otherwise no reader understands the description of this PR. |
Tabs removed and pull request description improved. |
@BrainforgeUK The pull request description still does not show your code because you haven't quoted it into `` quotes. |
P.S. You also haven't made a selection among the check boxes if there are documentation changes required or not. |
What's happending with this pull request? |
as usual, it needs 2 successful tests, and/or a RL decision |
also |
Fixed alignment of assignments
Does this require any action on my part? |
This pull request has been automatically rebased to 4.4-dev. |
Is this PR similar to #36692? |
Pull Request for Issue #38840 .
Summary of Changes
Gracefully handle error on module uninstallation due to error in module XML manifest file.
Testing Instructions
Install a module with this in the manifest:
Instead of:
Then try to uninstall it.
Actual result BEFORE applying this Pull Request
Uninstallation fails.
Get error Undefined constant "JPATH_"
1 () JROOT\libraries\src\Installer\Adapter\ModuleAdapter.php:370
2 constant() JROOT\libraries\src\Installer\Adapter\ModuleAdapter.php:370
3 Joomla\CMS\Installer\Adapter\ModuleAdapter->loadLanguage() JROOT\libraries\src\Installer\Adapter\ModuleAdapter.php:525
4 Joomla\CMS\Installer\Adapter\ModuleAdapter->setupUninstall() JROOT\libraries\src\Installer\InstallerAdapter.php:1150
5 Joomla\CMS\Installer\InstallerAdapter->uninstall() JROOT\libraries\src\Installer\Installer.php:875
6 Joomla\CMS\Installer\Installer->uninstall() JROOT\administrator\components\com_installer\src\Model\ManageModel.php:262
This is due to missing client="site" in module manifest.
Expected result AFTER applying this Pull Request
Uninstallation succeeds.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed