首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >致命错误:无法重新声明Drupal\views\Routing\ViewPageController::getTitle()

致命错误:无法重新声明Drupal\views\Routing\ViewPageController::getTitle()
EN

Drupal用户
提问于 2021-07-30 08:38:18
回答 1查看 260关注 0票数 1

我通过Composer更新了Drupal 9.0.1到9.2.2。更新后,我会得到一个致命的错误。

致命错误:无法在第98行的Drupal\views\Routing\ViewPageController::getTitle()中重新声明/var/www/html/docroot/core/modules/views/src/Routing/ViewPageController.php

drush updb输出以下内容。

代码语言:javascript
复制
 -------- ------------------ ------------- ------------------------------------ 
  Module   Update ID          Type          Description                         
 -------- ------------------ ------------- ------------------------------------ 
  file     add_txt_if_allow   post-update   Add txt to allowed extensions for   
           s_insecure_exten                 all fields that allow uploads of    
           sions                            insecure files.                     
  system   delete_rss_setti   post-update   Remove obsolete system.rss          
           ngs                              configuration.                      
  system   remove_key_value   post-update   Drop the 'all' index on the         
           _expire_all_inde                 'key_value_expire' table.           
           x                                                                    
  system   service_advisory   post-update   Add new security advisory           
           _settings                        retrieval settings.                 
  tour     joyride_selector   post-update   Convert Joyride selectors to        
           s_to_selector_pr                 `selector` property.   @see         
           operty                           tour_tour_presave()                 
  views    rename_default_d   post-update   Rename the setting for showing the  
           isplay_setting                   default display to                  
                                            'default_display'.                  
  views    title_translatio   post-update   Rebuild routes to fix view title    
           ns                               translations.                       
 -------- ------------------ ------------- ------------------------------------ 

Do you wish to run the specified pending updates? (yes/no) [yes]:
> [notice] Module kint has an entry in the system.schema key/value storage, but is missing from your site. 
> [notice] Update started: file_post_update_add_txt_if_allows_insecure_extensions
> [notice] Update completed: file_post_update_add_txt_if_allows_insecure_extensions
> [notice] Update started: system_post_update_delete_rss_settings
> [notice] Update completed: system_post_update_delete_rss_settings
> [notice] Update started: system_post_update_remove_key_value_expire_all_index
> [notice] Update completed: system_post_update_remove_key_value_expire_all_index
> [notice] Update started: system_post_update_service_advisory_settings
> [notice] Update completed: system_post_update_service_advisory_settings
> [notice] Update started: tour_post_update_joyride_selectors_to_selector_property
> [notice] Update completed: tour_post_update_joyride_selectors_to_selector_property
> [notice] Update started: views_post_update_rename_default_display_setting
> [notice] Update completed: views_post_update_rename_default_display_setting
> [notice] Update started: views_post_update_title_translations
> [notice] Update completed: views_post_update_title_translations
> PHP Fatal error:  Cannot redeclare Drupal\views\Routing\ViewPageController::getTitle() in /var/www/html/docroot/core/modules/views/src/Routing/ViewPageController.php on line 98> 
> [warning] Drush command terminated abnormally.

In ProcessBase.php line 171:
                                                                                                                                                                               
  Unable to decode output into JSON: Syntax error                                                                                                                              
                                                                                                                                                                               
  Fatal error: Cannot redeclare Drupal\views\Routing\ViewPageController::getTitle() in /var/www/html/docroot/core/modules/views/src/Routing/ViewPageController.php on line 98

任何提示都将不胜感激。

EN

回答 1

Drupal用户

发布于 2021-07-30 12:45:07

问题解决了。有一块已经被植入了。以及9.2.*在drupal核中加入了同样的内容。因此,删除修补程序解决了这个问题。

视图标题在面包屑和元标题没有得到正确的翻译

票数 1
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/305386

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档