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

Created on 26 October 2023, about 1 year ago
Updated 3 November 2023, about 1 year ago

Problem/Motivation

The jcarousel module is encountering an issue where it's triggering a Symfony\Component\DependencyInjection\Exception,
indicating that the "site.path" service is missing. This issue needs to be addressed to ensure the proper functioning
of the jcarousel module.

Steps to reproduce

  1. Install the jcarousel module.
  2. Enable the module.
  3. Attempt to use the jcarousel functionality.
  4. Observe the Symfony\Component\DependencyInjection\Exception error related to the missing "site.path" service.

Proposed resolution

To resolve this issue, we can use the following solution:

\Drupal::getContainer()->getParameter('site.path');

This code retrieves the "site.path" service parameter, ensuring that it is available when using the jcarousel module.

Remaining tasks

  • Implement the solution by incorporating the provided code to address the missing "site.path" service issue.

User interface changes

This issue does not involve any user interface changes.

API changes

This issue may involve changes to the module's code to ensure that the "site.path" service is available using the provided code.

Data model changes

This issue does not involve any data model changes.

πŸ› Bug report
Status

RTBC

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rishi kulshreshtha

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

Comments & Activities

Production build 0.71.5 2024