我的核心论坛模块安装在Drupal8.5.1系统上出错,现在,当我想卸载它时,我得到:
$ drush pmu --verbose forum
Executing: mysql --defaults-extra-file=/tmp/drush_R3Uhpd --database=drupal_2 --host=localhost --port=3306 --silent < /tmp/drush_enDNb4
Executing: mysql --defaults-extra-file=/tmp/drush_OWoaeC --database=drupal_2 --host=localhost --port=3306 --silent < /tmp/drush_3gNq9b
The following extensions will be uninstalled: forum
Do you really want to continue? (y/n): y
array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:227 [warning]
TypeError: Argument 1 passed to Drupal\forum\ForumUninstallValidator::hasTermsForVocabulary() must implement interface Drupal\taxonomy\VocabularyInterface, null given, called in [error]
/usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php on line 61 in Drupal\forum\ForumUninstallValidator->hasTermsForVocabulary() (line 103 of
/usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php)
#0 /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php(61): Drupal\forum\ForumUninstallValidator->hasTermsForVocabulary(NULL)
#1 /usr/local/www/drupal2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(560): Drupal\forum\ForumUninstallValidator->validate('forum')
#2 /usr/local/www/drupal2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(365): Drupal\Core\Extension\ModuleInstaller->validateUninstall(Array)
#3 /usr/local/www/drupal2/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91): Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#4 /vendor/drush/drush/commands/core/drupal/environment.inc(227): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#5 /vendor/drush/drush/commands/core/drupal/pm_8.inc(79): drush_module_uninstall(Array)
#6 /vendor/drush/drush/commands/pm/pm.drush.inc(1250): _drush_pm_uninstall(Array)
#7 /vendor/drush/drush/includes/command.inc(422): drush_pm_uninstall('forum')
#8 /vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#9 /vendor/drush/drush/includes/command.inc(199): drush_command('forum')
#10 /vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#11 /vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12 /vendor/drush/drush/drush.php(12): drush_main()
#13 {main}.
TypeError: Argument 1 passed to Drupal\forum\ForumUninstallValidator::hasTermsForVocabulary() must implement interface Drupal\taxonomy\VocabularyInterface, null given, called in /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php on line 61 in /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php on line 103 #0 /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php(61): Drupal\forum\ForumUninstallValidator->hasTermsForVocabulary(NULL)
#1 /usr/local/www/drupal2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(560): Drupal\forum\ForumUninstallValidator->validate('forum')
#2 /usr/local/www/drupal2/core/lib/Drupal/Core/Extension/ModuleInstaller.php(365): Drupal\Core\Extension\ModuleInstaller->validateUninstall(Array)
#3 /usr/local/www/drupal2/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91): Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#4 /vendor/drush/drush/commands/core/drupal/environment.inc(227): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#5 /vendor/drush/drush/commands/core/drupal/pm_8.inc(79): drush_module_uninstall(Array)
#6 /vendor/drush/drush/commands/pm/pm.drush.inc(1250): _drush_pm_uninstall(Array)
#7 /vendor/drush/drush/includes/command.inc(422): drush_pm_uninstall('forum')
#8 /vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#9 /vendor/drush/drush/includes/command.inc(199): drush_command('forum')
#10 /vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#11 /vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12 /vendor/drush/drush/drush.php(12): drush_main()
#13 {main}
TypeError: Argument 1 passed to Drupal\forum\ForumUninstallValidator::hasTermsForVocabulary() must implement interface Drupal\taxonomy\VocabularyInterface, null given, called in /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php on line 61 in Drupal\forum\ForumUninstallValidator->hasTermsForVocabulary() (line 103 of /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
A non well formed numeric value encountered drush.inc:1671如何卸载此模块,因为此问题会导致admin/modules/卸载页面崩溃:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\forum\ForumUninstallValidator::hasTermsForVocabulary() must implement interface Drupal\taxonomy\VocabularyInterface, null given, called in /usr/local/www/drupal2/core/modules/forum/src/ForumUninstallValidator.php on line 61 in Drupal\forum\ForumUninstallValidator->hasTermsForVocabulary() (line 103 of core/modules/forum/src/ForumUninstallValidator.php).我的服务器配置: Apache/2.4.29 (FreeBSD) OpenSSL/1.0.1u-FreeBSDPHP/7.1.14
PHP Ver.7.1.14
DB MySQL Ver.5.6.37
编辑:
我忘了提到,管理/结构/论坛给了我以下内容:
Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 227 of /usr/local/www/drupal2/core/lib/Drupal/Core/Entity/EntityStorageBase.php)
#0 /usr/local/www/drupal2/core/includes/bootstrap.inc(582): _drupal_error_handler_real(2, 'array_flip(): C...', '/usr/local/www/...', 227, Array)
#1 [internal function]: _drupal_error_handler(2, 'array_flip(): C...', '/usr/local/www/...', 227, Array)
#2 /usr/local/www/drupal2/core/lib/Drupal/Core/Entity/EntityStorageBase.php(227): array_flip(Array)
#3 /usr/local/www/drupal2/core/lib/Drupal/Core/Entity/EntityStorageBase.php(212): Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array)
#4 /usr/local/www/drupal2/core/modules/forum/src/Form/Overview.php(54): Drupal\Core\Entity\EntityStorageBase->load(NULL)
#5 [internal function]: Drupal\forum\Form\Overview->buildForm(Array, Object(Drupal\Core\Form\FormState), NULL)
#6 /usr/local/www/drupal2/core/lib/Drupal/Core/Form/FormBuilder.php(514): call_user_func_array(Array, Array)
#7 /usr/local/www/drupal2/core/lib/Drupal/Core/Form/FormBuilder.php(271): Drupal\Core\Form\FormBuilder->retrieveForm('forum_overview', Object(Drupal\Core\Form\FormState))
#8 /usr/local/www/drupal2/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('forum_overview', Object(Drupal\Core\Form\FormState))
#9 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#10 /usr/local/www/drupal2/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 /usr/local/www/drupal2/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /usr/local/www/drupal2/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 /usr/local/www/drupal2/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 /usr/local/www/drupal2/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /usr/local/www/drupal2/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#16 /usr/local/www/drupal2/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /usr/local/www/drupal2/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /usr/local/www/drupal2/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /usr/local/www/drupal2/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /usr/local/www/drupal2/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /usr/local/www/drupal2/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /usr/local/www/drupal2/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /usr/local/www/drupal2/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /usr/local/www/drupal2/core/lib/Drupal/Core/DrupalKernel.php(664): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /usr/local/www/drupal2/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#26 {main}.
Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 227 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Page not found.THX
发布于 2018-04-09 16:26:35
只需重新创建论坛词汇表,然后您应该能够卸载模块。
发布于 2020-02-11 07:43:37
下面对它进行了修正,我怀疑这是因为在生成论坛内容而没有论坛词汇表时,Devel模块(在我的例子中)中有一些bug:
以下原因阻止了论坛的卸载:要卸载论坛,首先删除所有论坛内容
发布于 2023-01-19 20:56:17
试着先检查数据库:
select * from public.node__taxonomy_forums
select * from public.taxonomy_term_revision__forum_container;
我在taxonomy_term_revision__forum_container中找到了我不知道的三个术语。一旦这些被删除,我能够成功卸载论坛。
drush pmu forum
https://drupal.stackexchange.com/questions/259483
复制相似问题