? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
3 Nov 2017

Summary of Changes

When trying to uninstall a module, the following error is thrown:

Return value of Joomla\CMS\Installer\Adapter\ModuleAdapter::finaliseUninstall() must be of the type boolean, null returned

This PR addresses that

Testing Instructions

  1. Install a module
  2. Uninstall the module
  3. No PHP errors should be displayed

Expected result

No PHP errors

Actual result

Return value of Joomla\CMS\Installer\Adapter\ModuleAdapter::finaliseUninstall() must be of the type boolean, null returned

avatar C-Lodder C-Lodder - open - 3 Nov 2017
avatar C-Lodder C-Lodder - change - 3 Nov 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2017
Category Libraries
avatar mbabker
mbabker - comment - 3 Nov 2017

I don't think that's the right fix. We aren't initializing $retval anywhere to return true, so there's a mix of undefined variable for when everything goes smoothly and the lack of a boolean return.

avatar C-Lodder
C-Lodder - comment - 3 Nov 2017

@mbabker - shall I declare it at the top of the function?

avatar mbabker
mbabker - comment - 3 Nov 2017

Yes please.

avatar C-Lodder C-Lodder - change - 3 Nov 2017
Labels Added: ?
avatar C-Lodder
C-Lodder - comment - 4 Nov 2017

@mbabker - that ok now?

avatar wilsonge
wilsonge - comment - 13 Nov 2017

So do we actually want to ignore the error like the comment says or not? It doesn't seem like a db query we want to ignore :/

avatar mbabker
mbabker - comment - 13 Nov 2017

It might be worth raising a warning in the UI but it's not worth failing the overall uninstall over.

avatar C-Lodder
C-Lodder - comment - 13 Nov 2017

Cool, I'll do that this evening then

avatar C-Lodder
C-Lodder - comment - 14 Nov 2017

Removing $retval = false; as we've now defined $retval = true; at the top of the function.

I can raise a warning if it really is needed (e.g Extension could not be deleted from the #__modules table in the database), just let me know what the message should say exactly

avatar wilsonge wilsonge - change - 14 Nov 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-11-14 15:53:31
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Nov 2017
avatar wilsonge wilsonge - merge - 14 Nov 2017
avatar avjoomla
avjoomla - comment - 11 Dec 2017

Hi,

I run into the exact same problem with the finaliseUninstall in the ComponentAdapter (libraries/src/Installer/Adapter/ComponentAdapter.php)
Was this fixed only for the ModuleAdapter or for other Adapters, too?

I installed Joomla! 4 from joomla-cms-4.0.0-alpha1.zip with date form 21.11.2017.
Joomla! 4.0.0-dev Development [ Amani ] 31-March-2017 23:59 GMT
php 7.1.7 on local xampp on windows 7

Regards,
Aicha


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

avatar infograf768
infograf768 - comment - 11 Dec 2017
avatar avjoomla
avjoomla - comment - 11 Dec 2017

@infograf768
Thanks, that was my question. This version works fine.

Just as some additional information for your:
On November 11th, 2017 JED published a Newsletter "Breaking News: Joomla 4.0 Alpha 1 is here!"
With a download link for Joomla! 4.0 Alpha 1
https://github.com/joomla/joomla-cms/releases/tag/4.0.0-alpha1
This is actually the link, where I downloaded the installation from, that is not working.

Sorry for causing you additional work.
Regards,
Aicha


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

avatar wilsonge
wilsonge - comment - 11 Dec 2017

That's ok :) Lots has changed in the last month obviously :) You can always download the latest nightly builds (which are rebuilt at 1am every morning) from https://developer.joomla.org/nightly-builds.html - I'll make sure I ping JED and ask them to also link to the nightlies page in the future. It's a really good point

Add a Comment

Login with GitHub to post a comment