Install latest Gantry 5 package from https://github.com/gantry/gantry5/releases/download/5.4.13/joomla-pkg_gantry5_v5.4.13.zip and then install it again.
Installation should succeed without warnings and if you go to Extensions > Manage > Manage
and filter by Gantry 5, you should see Gantry 5 Framework
library entry only a single time.
During second installation you will see a warning:
Warning
The Gantry 5 Framework extension is part of a package which does not allow individual extensions to be uninstalled.
When you visit Extensions > Manage > Manage
, you will see the library installed 2 times. Every new install after this will add a new extension entry.
Tested with Joomla 3.7.2
This bug was introduced in pull #13154 by @mbabker. It looks like that preventing uninstallation for child extensions will break library installation, which works by uninstalling library before installing the new version.
Labels |
Added:
?
|
Category | ⇒ | com_installer |
This honestly looks to be a very edge case scenario with your stuff if you're trying to fully uninstall something in the middle of an install/upgrade routine.
Since you're triggering an uninstall in the middle of an install/update routine, I assume you are also doing this within a custom script because core is definitely not doing this. Call JInstaller::setPackageUninstall(true)
and you can bypass that warning.
@mbabker I'm not doing anything. It's all Joomla. Just create a package with a library in it and use your feature. :)
Here is the code that fails:
Unfortunately calling the JInstaller::setPackageUninstall(true)
didn't help (tried it before writing this report) as installer creates a new instance of the installer just before removing the package. I wasn't sure if it is the right method, but yeah, I think we can fix the library installer by doing just that.
Yeah, I noticed it when we were rewriting the installer first time (some of the work went later to the current version). I was going to look into it, but we took too large a bite back then and the work was dropped for a long time. There's also issue in template uninstaller not calling the install script, btw..
Anyway, do I write a quick patch to fix this one or are you going to look into it? Unfortunately, my work situation doesn't allow me to look deeper into this. :(
That one's an easy patch if you've got the time. As for anything bigger, it's all going into 4.0 at this point because I am making B/C breaks along the way (namely abstract base functions).
Yea, I can add the call. As for J4.0, the installer is much better thanks to the work you've put into it, but there are still parts that are the broken old code. A few installers still have issues, so it would be nice to finish the work.
Anyway, I really appreciate all the work you're still putting into Joomla and I can only wonder how you are finding all the time for it. Two years back I was almost sure that by now you'd given up your position. :)
staging is 3.7.3
Alright, the fix is up there ^
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-16 19:06:28 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16720
closed as having PR #16729
Well in good news that means there's only one adapter to remove the FUBAR flag from in 4.0 ;-)
Hmm.. Looks like there's no easy workaround for the issue.
Also: should the installation of the package fail if library cannot be uninstalled?