How can this be fixed to do a clean uninstall?PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function CMSModule::RemovePermission(), 0 passed in ~/modules/btAdminer/method.uninstall.php on line 18 and exactly 1 expected in ~/lib/classes/class.CMSModule.php:2954
Stack trace:Code: Select all
#0 ~/modules/btAdminer/method.uninstall.php(18): CMSModule->RemovePermission() #1 ~/lib/classes/class.CMSModule.php(1034): include('/homepages/30/d...') #2 ~/lib/classes/class.moduleoperations.inc.php(901): CMSModule->Uninstall() #3 ~/modules/ModuleManager/action.local_uninstall.php(30): ModuleOperations->UninstallModule('btAdminer') #4 ~/lib/classes/class.CMSModule.php(1403): include('/homepages/30/d...') #5 ~/modules/ModuleManager/ModuleManager.module.php(90): CMSModule->DoAction('local_uninstall', 'm1_', Array, '') #6 ~/li in ~/lib/classes/class.CMSModule.php on line 2954
Fatal error while uninstalling module
Fatal error while uninstalling module
I’ve got a site running on CMS 2.2.13 and have a relic module (btAdminer) that I wanted to uninstall because it doesn’t work properly anymore anyway. The process fails with the following error:
Re: Fatal error while uninstalling module
Looking at the method.install.php file I see it sets two permissions:
$this->CreatePermission('Use btAdminer', 'Use btAdminer');
$this->CreatePermission('Set btAdminer Prefs', 'Set btAdminer Prefs');
Those should be removed by the installer. Note that that's about the only thing the uninstall does in this case.
So consider just to remove the btAdminer folder from /modules/.
Eventually you can remove the two btAdminer permissions manually from the database table cms_permissions.
Of course you should create a database backup before doing so.
$this->CreatePermission('Use btAdminer', 'Use btAdminer');
$this->CreatePermission('Set btAdminer Prefs', 'Set btAdminer Prefs');
Those should be removed by the installer. Note that that's about the only thing the uninstall does in this case.
So consider just to remove the btAdminer folder from /modules/.
Eventually you can remove the two btAdminer permissions manually from the database table cms_permissions.
Of course you should create a database backup before doing so.
Re: Fatal error while uninstalling module
Thanks much; it’s that easy.