php - Drupal 8.5.1 升级错误 - 在哪里查找故障排除?

标签 php mysql drupal drupal-8 drush

我正在将站点从 8.3.5 升级到 8.5.1

我更新了代码库,通过 composer 配置了模块,并使用 cgr 升级了我的 drush 安装,并在安装中运行 drush 9。我让这个网站在我本地环境的开发数据库上运行得很好

我正在努力将数据库从生产服务器移植到开发环境中。将 Acquia DevDesktop 2 用于本地开发环境。 我可以运行 drush status,一切似乎都很好:

DB hostname : 127.0.0.1
DB port : 33067
DB username : drupaluser
DB name : site_migration_851
Database : Connected
Drupal bootstrap : Successful
Default theme : site_theme
Admin theme : seven
PHP binary : /Applications/DevDesktop/php5_6/bin/php
PHP config : /Applications/DevDesktop/php5_6/bin/php.ini
PHP OS : Darwin
Drush script : /Volumes/Video_Drive/web/DrupalProjects/site-mig ration-851/vendor/drush/drush/drush Drush version : 9.2.3
Drush temp : /tmp
Drush configs : /Volumes/Video_Drive/web/DrupalProjects/site-mig ration-851/vendor/drush/drush/drush.yml Install profile : standard
Drupal root : /Volumes/Video_Drive/web/DrupalProjects/site-mig ration-851 Site path : sites/default
Files, Public : sites/default/files
Files, Temp : /tmp

我无法在浏览器中加载网站,出现以下错误:

The website encountered an unexpected error. Please try again later.Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /" in Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (line 144 of vendor/symfony/http-kernel/EventListener/RouterListener.php).

Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 114) Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object) call_user_func(Array, Object, 'kernel.request', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 127) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 664) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

当我运行 drush cr 时,出现以下错误: [错误] 由于不可恢复的错误,Drush 命令异常终止。 错误:调用/Volumes/web/DrupalProjects/site-migration-851/core/includes/common.inc 中的未定义函数 system_rebuild_module_data(),第 1123 行

我尝试使用 token 运行/core/rebuild.php,它生成的很好,但它出错并显示与上面相同的消息。

在阅读了其他人在这里和 drupal 社区网站上的经验后,我手动截断了数据库中的“cache_”表。

我还检查了配置管理器设置,uuid 与旧开发数据库相同。我重置了它,尝试对 prod 数据库运行同步更改,但没有任何改变。

仍然无法使用 prod 数据库加载站点。目标是让代码库与生产数据库一起运行,因为它具有正确的内容等。

生产数据库中是否有什么东西干扰了核心旋转正确的路线?

更新:

我重新运行了 composer update 和 composer install 能够成功进入/core/install.php 页面。 它告诉我已安装 drupal。 重新开始的第一个选项是不可取的,因为我需要保留内容数据。

当我转到/update.php url 时

The website encountered an unexpected error. Please try again later. Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "access_check.db_update". in Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition() (line 1024 of vendor/symfony/dependency-injection/ContainerBuilder.php). Symfony\Component\DependencyInjection\ContainerBuilder->getDefinition('access_check.db_update') (Line: 591) Symfony\Component\DependencyInjection\ContainerBuilder->doGet('access_check.db_update', 1) (Line: 569) Symfony\Component\DependencyInjection\ContainerBuilder->get('access_check.db_update') (Line: 182) Drupal\Core\Update\UpdateKernel->handleAccess(Object, Object) (Line: 99) Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 73) Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 28)

当我转到网站的首页时,它返回:

The website encountered an unexpected error. Please try again later.Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 133 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Drupal\Core\Entity\EntityTypeManager->getHandler('node', 'storage') (Line: 169) Drupal\Core\Entity\EntityTypeManager->getStorage('node') (Line: 79) Drupal\Core\Entity\EntityManager->getStorage('node') (Line: 100) Drupal\Core\ParamConverter\EntityConverter->convert('43', Array, 'node', Array) (Line: 100) Drupal\Core\ParamConverter\ParamConverterManager->convert(Array) (Line: 45) Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance(Array, Object) (Line: 259) Drupal\Core\Routing\Router->applyRouteEnhancers(Array, Object) (Line: 130) Drupal\Core\Routing\Router->matchRequest(Object) (Line: 90) Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 114) Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object) call_user_func(Array, Object, 'kernel.request', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 127) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 664) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

运行 drush dbup & entup 返回以下错误:

Fatal error: Call to undefined function system_rebuild_module_data() in /web/DrupalProjects/site/site/core/includes/update.inc on line 46

另外 drush entup 产生如下状态,然后报错

[success] No entity schema updates required Fatal error: Call to undefined function system_rebuild_module_data() in /web/DrupalProjects/site/site/core/includes/common.inc on line 1123 [success] Finished performing updates.

很奇怪。

最佳答案

运行这些命令以获得对升级版 Drupal 的依赖。

composer update
composer install

关于php - Drupal 8.5.1 升级错误 - 在哪里查找故障排除?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50014644/

相关文章:

php - 这些使用 db_or() 的 Drupal SQL 查询有什么问题?

css - <nolink> 不适用于 iPad?

Drupal 自定义菜单定位

php - 拉拉维尔 5.4 : Translate routes

javascript - 使用 jQuery ajax 函数验证表单时未设置 $_POST 变量

mysql_options() 在 mysqlclient.lib 中崩溃

php - 在计算日期内的值的 sql 查询中需要帮助

php - 从 MySQL 数据库的一行中读取一列

php - 通过 HTTP API 将大文件上传到 Dropbox

php - Wordpress:使用方法 ="post"进行多语言选择