Non-existent service 'site.path'

Created on 20 April 2023, over 1 year ago
Updated 3 July 2023, over 1 year ago

Problem/Motivation

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

Drupal::service('site.path') (Line: 62)
Drupal\ckeditor_font\Plugin\CKEditorPlugin\FontCKEditorButton->getLibraryPath() (Line: 93)
Drupal\ckeditor_font\Plugin\CKEditorPlugin\FontCKEditorButton->getFile() (Line: 94)

Steps to reproduce

Install Drupal 10, PHP 8.2 and ckeditor_font, visit page with CKEditor.

Proposed resolution

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

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States stevenlafl

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

Comments & Activities

Production build 0.71.5 2024