Skip to main content
3 of 3
removed "Drupal" and tags from the title
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Fatal error: Cannot redeclare Drupal\views\Routing\ViewPageController::getTitle()

I have updated Drupal 9.0.1 to 9.2.2 via Composer. After updating, I am getting a fatal 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

drush updb outputs the following.

 -------- ------------------ ------------- ------------------------------------ 
  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

Any hint will be appreciated.