When I click some configuration buttons for example in layout builder UI or the following buttons. enter image description here I get the following error in admin/reports/dblog

You have requested a non-existent parameter "site.path". en Drupal\Component\DependencyInjection\Container->getParameter() 
(linea 328 de /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php)

A coworker with the same local but using windows (without wsl) has everything working normally. I used docker and ddev on ubuntu 22.04 LTS and on windows but with wsl, it doesn't work on both. Could it be something about permissions? I have sites/default/files and sites/default with a+w permissions

As the title says I am using Drupal 8.9.20 and I really do not know what to do.

If you need more information just ask me for it and I will edit the post.

Debugger data when gets to line 328 enter image description here

  • The error says that some module or theme on the site is referencing 'site.path', which is not an existing container parameter. I think the parameter is called '@site.path': drupal.org/node/3080612
    – cilefen
    Apr 4, 2023 at 16:50
  • Yeah I check that but I wasn't able to find a 'site.path' reference without the @ Apr 4, 2023 at 16:51
  • This is similar to drupal.stackexchange.com/questions/309827/…
    – cilefen
    Apr 4, 2023 at 16:54
  • I check that too but I'm not using %site.path% anywhere Apr 4, 2023 at 16:56
  • You will have to use a debugger then. I don't think we can answer the question without more information.
    – cilefen
    Apr 4, 2023 at 16:57

1 Answer 1


The error is caused by the module CKEditor Anchor Link:


   * Get the CKEditor Link library path.
  protected function getLibraryPath() {
    // Following the logic in Drupal 8.9.x and Drupal 9.x
    // ----------------------------------------------------------------------
    // Issue #3096648: Add support for third party libraries in site specific
    // and install profile specific libraries folders
    // https://www.drupal.org/project/drupal/issues/3096648
    // https://git.drupalcode.org/project/drupal/commit/1edf15f
    // -----------------------------------------------------------------------
    // Search sites/<domain>/*.
    $directories[] = \Drupal::getContainer()->getParameter('site.path') . "/libraries/";

The last line listed works only in Drupal >=9.

You will find an increasing number of modules switching to Drupal 9/10 because Drupal 8 is no longer supported. The only issue here is that the module is still marked as Works with Drupal: ^8 || ^9 || ^10.

You either need to upgrade to Drupal 9 (recommended) or downgrade the module.

As a quick fix, until you find time to upgrade to Drupal 9, you can patch this code line to work with Drupal 8:

$directories[] = \Drupal::service('site.path') . "/libraries/";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.