Problem/Motivation

Experiencing an error when permissions-by-term/access-info-by-url?url=... is (ajax) requested

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "path.alias_manager". Did you mean this: "path_alias.manager"? in Drupal\Component\DependencyInjection\Container->get() (regel 151 van ../web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Steps to reproduce

Use recent drupal 9.1.2

Proposed resolution

'path.alias_manager' has been deprectated since 8.8.x

Renaming this to path_alias.manager resolves the issue, see patch attached.

Comments

j0sbeir created an issue. See original summary.

j0sbeir’s picture

Title: path.alias_manager should renamed to path_alias.manager (NodeEntityBundleController) » path.alias_manager should be renamed to path_alias.manager (NodeEntityBundleController)
fmb’s picture

Oops sorry I opened a different issue for the same problem. Here is my suggestion, which uses injection instead of static calls and declares the Path Alias module as a dependency.

fmb’s picture

Status: Active » Needs review
jepster_’s picture

Status: Needs review » Fixed

Thanks for sharing your patch! It has been applied to version 3.1.6: https://www.drupal.org/project/permissions_by_term/releases/3.1.6

jepster_’s picture

Version: 3.1.4 » 3.1.6
Status: Fixed » Closed (fixed)