Cannot uninstall Searchkit (dmaster)
@colemanw I'm having trouble uninstalling SearchKit. I've run this a few ways:
- With a recent HEAD (e812dab8 and with the mgd refactor PR
#22959
(6dacf3a1b6f5b0faa64854762e1cebd135354d05) - With CLI and with GUI
- With a random configuration and with
civibuild restore
(back to initial cfg)
There are two different errors that I would see. I couldn't determine the exact circumstance that distinguished between them, so I'm just posting both. The first seems to be more reproducible at the moment (ie it comes when I start from my DB snapshot).
[bknix-max:~/bknix/build/dmaster/web/sites/all/modules/civicrm] civibuild restore dmaster && cv ext:uninstall civigrant afform_admin search_kit
[[Skip hub. Could not determine binary.]]
WARNING: Failed to find recommended PHP extension "imap".
[[Load saved options from /Users/totten/bknix/build/dmaster.sh]]
[[Setup MySQL and HTTP for CMS]]
[[Restore "/Users/totten/bknix/build/dmaster/web" DB (cms) from file (/Users/totten/bknix/build/.civibuild/snapshot/dmaster/cms.sql.gz)]]
[[Setup MySQL for Civi]]
[[Restore "/Users/totten/bknix/build/dmaster/web" DB (civi) from file (/Users/totten/bknix/build/.civibuild/snapshot/dmaster/civi.sql.gz)]]
[[Setup MySQL for Test]]
[[Restore "/Users/totten/bknix/build/dmaster/web" DB (test) from file (/Users/totten/bknix/build/.civibuild/snapshot/dmaster/civi.sql.gz)]]
Uninstalling extension "civigrant"
Uninstalling extension "org.civicrm.afform_admin"
Uninstalling extension "org.civicrm.search_kit"
Error: API Call Failed: Array
(
[entity] => Extension
[action] => uninstall
[params] => Array
(
[keys] => Array
(
[0] => civigrant
[1] => org.civicrm.afform_admin
[2] => org.civicrm.search_kit
)
[debug] => 1
[version] => 3
)
[result] => Array
(
[trace] => #0 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(483): civicrm_api3('SearchDisplay', 'get', Array)
#1 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(299): CRM_Core_ManagedEntities->removeStaleEntity(Object(CRM_Core_DAO_Managed))
#2 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(130): CRM_Core_ManagedEntities->reconcileUnknownModules()
#3 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(413): CRM_Core_ManagedEntities->reconcile()
#4 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager.php(483): CRM_Core_Invoke::rebuildMenuAndCaches(true)
#5 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/api/v3/Extension.php(183): CRM_Extension_Manager->uninstall(Array)
#6 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_uninstall(Array)
#7 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#8 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest(Array)
#9 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe('Extension', 'uninstall', Array)
#10 phar:///Users/totten/bknix/bin/cv/src/Command/BaseCommand.php(63): civicrm_api('Extension', 'uninstall', Array)
#11 phar:///Users/totten/bknix/bin/cv/src/Command/ExtensionUninstallCommand.php(63): Civi\Cv\Command\BaseCommand->callApiSuccess(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'Extension', 'uninstall', Array)
#12 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Command/Command.php(255): Civi\Cv\Command\ExtensionUninstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Civi\Cv\Command\ExtensionUninstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 phar:///Users/totten/bknix/bin/cv/src/Application.php(59): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(149): Civi\Cv\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 phar:///Users/totten/bknix/bin/cv/src/Application.php(26): Symfony\Component\Console\Application->run()
#18 phar:///Users/totten/bknix/bin/cv/bin/cv(27): Civi\Cv\Application::main('phar:///Users/t...')
#19 /Users/totten/bknix/bin/cv(14): require('phar:///Users/t...')
#20 {main}
[is_error] => 1
[error_message] => API (SearchDisplay, get) does not exist (join the API team and implement it!)
)
)
And then:
[bknix-max:~/bknix/build/dmaster/web/sites/all/modules/civicrm] cv ext:uninstall civigrant afform_admin search_kit
Uninstalling extension "civigrant"
Uninstalling extension "org.civicrm.afform_admin"
Uninstalling extension "org.civicrm.search_kit"
Error: API Call Failed: Array
(
[entity] => Extension
[action] => disable
[params] => Array
(
[keys] => Array
(
[0] => civigrant
[1] => org.civicrm.afform_admin
[2] => org.civicrm.search_kit
)
[debug] => 1
[version] => 3
)
[result] => Array
(
[trace] => #0 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(452): civicrm_api3('SearchDisplay', 'getrefcount', Array)
#1 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(299): CRM_Core_ManagedEntities->removeStaleEntity(Object(CRM_Core_DAO_Managed))
#2 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(130): CRM_Core_ManagedEntities->reconcileUnknownModules()
#3 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(413): CRM_Core_ManagedEntities->reconcile()
#4 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Extension/Manager.php(425): CRM_Core_Invoke::rebuildMenuAndCaches(true)
#5 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/api/v3/Extension.php(150): CRM_Extension_Manager->disable(Array)
#6 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_disable(Array)
#7 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#8 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest(Array)
#9 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe('Extension', 'disable', Array)
#10 phar:///Users/totten/bknix/bin/cv/src/Command/BaseCommand.php(63): civicrm_api('Extension', 'disable', Array)
#11 phar:///Users/totten/bknix/bin/cv/src/Command/ExtensionUninstallCommand.php(56): Civi\Cv\Command\BaseCommand->callApiSuccess(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'Extension', 'disable', Array)
#12 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Command/Command.php(255): Civi\Cv\Command\ExtensionUninstallCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Civi\Cv\Command\ExtensionUninstallCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 phar:///Users/totten/bknix/bin/cv/src/Application.php(59): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 phar:///Users/totten/bknix/bin/cv/vendor/symfony/console/Application.php(149): Civi\Cv\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 phar:///Users/totten/bknix/bin/cv/src/Application.php(26): Symfony\Component\Console\Application->run()
#18 phar:///Users/totten/bknix/bin/cv/bin/cv(27): Civi\Cv\Application::main('phar:///Users/t...')
#19 /Users/totten/bknix/bin/cv(14): require('phar:///Users/t...')
#20 {main}
[is_error] => 1
[error_message] => The entity 'SearchDisplay' is unknown or unsupported by 'getrefcount'. Consider implementing this API.
)
)
Environment:
- PHP 7.4
- MySQL 8.0
- Drupal 7 (
drupal-demo
)