You have requested a non-existent service "site.path"

Created on 10 January 2023, almost 2 years ago
Updated 1 May 2023, over 1 year ago

Problem/Motivation

Drupal 10 has removed the app.root and site.path services (which were non-object services, basically strings) and so that breaks enabling this module on Drupal 10.

Steps to reproduce

Composer require and then drush en dev_mode - triggers the following error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "site.path". in Drupal\Component\DependencyInjection\Container->get() (line 157 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Proposed resolution

Use getParameter from the global container rather than trying to retrieve a non-existent service.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom welly

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