1

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.

2
  • How did you upgrade Drupal? Manual update or update via Composer?
    – misterdidi
    Jul 30, 2021 at 9:50
  • @misterdidi via composer> composer update drupal/core "drupal/core-*" --with-all-dependencies Jul 30, 2021 at 9:54

1 Answer 1

1

Issue got resolved. There was a patch which was already implemeted. and 9.2.* has incorporated the same in drupal core. So removing the patch has fixed the issue

View titles in breadcrumb and metatag title don't get properly translated

1
  • 1
    Thanks so much for sharing this! Saved me many hours. Jul 31, 2021 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.