I got this error in configuration import after a staging upgrade attempt:

Error: Call to a member function getPath() on null in /opt/APLI/PTS02/www/core/modules/config_translation/src/ConfigNamesMapper.php, line 233

I got the same error when trying to rebuild the cache (from drush). Routing system seems to be down so many website paths doesn't work, I got:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "xxxxxx" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core/lib/Drupal/Core/Routing/RouteProvider.php). 

I don't know the exact reasons of this error. Any ideas?

Full stack trace:

> drush cr
PHP Fatal error:  Call to a member function getPath() on null in /.../core/modules/config_translation/src/ConfigNamesMapper.php on line 233
PHP Stack trace:
PHP   1. {main}() /.../drush:0
PHP   2. require() /.../drush:10
PHP   3. drush_startup() phar:///.../drush/drush:114
PHP   4. drush_main() phar:///.../drush/includes/startup.inc:321
PHP   5. Drush\Boot\BaseBoot->bootstrap_and_dispatch() phar:///.../drush/includes/preflight.inc:66
PHP   6. drush_dispatch() phar:///.../drush/lib/Drush/Boot/BaseBoot.php:67
PHP   7. call_user_func_array:{phar:///.../drush/includes/command.inc:185}() phar:///.../drush/includes/command.inc:185
PHP   8. drush_command() phar:///.../drush/includes/command.inc:185
PHP   9. _drush_invoke_hooks() phar:///.../drush/includes/command.inc:217
PHP  10. call_user_func_array:{phar:///.../drush/includes/command.inc:366}() phar:///.../drush/includes/command.inc:366
PHP  11. drush_cache_rebuild() phar:///.../drush/includes/command.inc:366
PHP  12. drupal_rebuild() phar:///.../drush/commands/core/cache.drush.inc:291
PHP  13. drupal_flush_all_caches() /.../core/includes/utility.inc:51
PHP  14. Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() /.../core/includes/common.inc:1141
PHP  15. Drupal\Core\Routing\RouteBuilder->rebuild() /.../core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php:83
PHP  16. Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() /.../core/lib/Drupal/Core/Routing/RouteBuilder.php:184
PHP  17. Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes() /.../core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:111
PHP  18. Drupal\config_translation\Routing\RouteSubscriber->alterRoutes() /.../core/lib/Drupal/Core/Routing/RouteSubscriberBase.php:37
PHP  19. Drupal\config_translation\ConfigNamesMapper->getOverviewRoute() /.../core/modules/config_translation/src/Routing/RouteSubscriber.php:39
Drush command terminated abnormally due to an unrecoverable error.                                                                                                    [error]
Error: Call to a member function getPath() on null in /.../core/modules/config_translation/src/ConfigNamesMapper.php, line 233

Comments

manuel.adan’s picture

It seems to be related to workflow module, see #2823659

AswathyAjish’s picture

Thanks for the update.

I had the same error while enabling the module 'Configuration Translation'.

Now I uninstalled 'Workflow' module from my site and I enabled the 'Configuration Translation' module and it is working fine.

Once again thank you, You saved my time.