change path_alias.manager to path.alias_manager

Created on 12 December 2022, almost 2 years ago
Updated 27 January 2023, almost 2 years ago

AH01071: Got error 'PHP message: Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service "path.alias_manager". Did you mean this: "path_alias.manager"?" at /var/www/vhosts/pre/httpdocs/docroot/core/lib/Drupal/Component/DependencyInjection/Container.php line 156'

Drupal 9
change
$current_path_alias = \Drupal::service('path.alias_manager')->getAliasByPath($current_path);
to new
$current_path_alias = \Drupal::service('path_alias.manager')->getAliasByPath($current_path);

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany HeavyStoneHead

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024