?
avatar nikosdion
nikosdion
30 Jul 2021

Steps to reproduce the issue

Install a plugin. Any plugin.

Delete its folder. For example, if you have a system plugin named foo delete the folder plugins/system/foo.

Go to System, Manage, Extensions and try to uninstall the plugin.

Expected result

The dead plugin record is removed from #__extensions and I possibly get a warning. Like in Joomla 3.

Actual result

Call to a member function attributes() on null

Call stack

# Function Location
1 () JROOT/libraries/src/Installer/Adapter/PluginAdapter.php:424
2 Joomla\CMS\Installer\Adapter\PluginAdapter->setupUninstall() JROOT/libraries/src/Installer/InstallerAdapter.php:1188
3 Joomla\CMS\Installer\InstallerAdapter->uninstall() JROOT/libraries/src/Installer/Installer.php:784
4 Joomla\CMS\Installer\Installer->uninstall() JROOT/administrator/components/com_installer/src/Model/ManageModel.php:268
5 Joomla\Component\Installer\Administrator\Model\ManageModel->remove() JROOT/administrator/components/com_installer/src/Controller/ManageController.php:119
6 Joomla\Component\Installer\Administrator\Controller\ManageController->remove() JROOT/libraries/src/MVC/Controller/BaseController.php:730
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:146
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
9 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
10 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
11 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
12 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
13 require_once() JROOT/administrator/index.php:32

System information (as much as possible)

Joomla 4.0-RC5
PHP 7.4.20

Additional comments

This also happens when you try to uninstall a package which references the plugin. In fact, you can not uninstall the package without manually editing the #__extensions table to remove the dead plugin.

This is a very serious problem on real world sites which have a decade-long history on Joomla 3. In many cases people have deleted the folders of plugins they wanted to get rid of without uninstalling the plugin. They will now end up with stuck packages they cannot remove. I many cases the original packages are no longer available — e.g. the extension developer is out of business or no longer offers the software for download — or cannot be installed on Joomla 4.

avatar nikosdion nikosdion - open - 30 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jul 2021
avatar nikosdion
nikosdion - comment - 30 Jul 2021

BTW, the reason I have not managed to test the PRs of other issues I've filed is I keep bumping onto issues and trying to work around them for my software.

avatar richard67
richard67 - comment - 30 Jul 2021

BTW, the reason I have not managed to test the PRs of other issues I've filed is I keep bumping onto issues and trying to work around them for my software.

@nikosdion We found testers for them so all ok. And keep on filing issues if you find some, thanks for that. Well try to fix them of course.

avatar nikosdion
nikosdion - comment - 30 Jul 2021

@richard67 Thank you! Unlike previously, I am now testing with a local copy of our live site that has a continuous history that goes back to Joomla 1.7 (1.0 to 1.5 and 1.5 to 1.7 were migrations to a clean site). This gives a nice decade of going through several trials and tribulations and I am hitting all the snags people with real sites will. Whee!

avatar richard67
richard67 - comment - 30 Jul 2021

Yep, I have such site too, but smaller and with less extensions.

avatar richard67
richard67 - comment - 30 Jul 2021

Would be interesting if that happens also with other adapters than plugin. Will check later or tomorrow.

avatar joomdonation joomdonation - change - 31 Jul 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-07-31 09:00:31
Closed_By joomdonation
avatar joomdonation joomdonation - close - 31 Jul 2021
avatar joomdonation
joomdonation - comment - 31 Jul 2021

Not perfect but PR #34996 should address this issue, so I'm closing this issue. Please help testing, thanks !

Add a Comment

Login with GitHub to post a comment