- Issue created by @almador
- 🇬🇪Georgia almador
Today I noticed that clearing caches shows this error:
The website encountered an unexpected error. Try again later. Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "class_resolver", path: "string_translation -> string_translator.locale.lookup -> config.factory -> config.typed -> class_resolver -> entity_type.manager". in Drupal\Component\DependencyInjection\Container->get() (line 149 of core/lib/Drupal/Component/DependencyInjection/Container.php). Drupal\Component\DependencyInjection\Container->get('class_resolver', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 239) Drupal\Component\DependencyInjection\Container->createService(Array, 'entity_type.manager') (Line: 179) Drupal\Component\DependencyInjection\Container->get('entity_type.manager') (Line: 315) Drupal::entityTypeManager() (Line: 218) Drupal\Core\Session\AccountProxy->loadUserEntity('185') (Line: 77) Drupal\Core\Session\AccountProxy->getAccount() (Line: 121) Drupal\Core\Session\AccountProxy->hasPermission('access devel information') (Line: 200) backtrace_error_handler(16384, 'Calling Drupal\Core\DependencyInjection\ClassResolver::__construct without the $container argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3419963', '/home/user/public_html/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php', 23) trigger_error('Calling Drupal\Core\DependencyInjection\ClassResolver::__construct without the $container argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3419963', 16384) (Line: 23) Drupal\Core\DependencyInjection\ClassResolver->__construct() (Line: 261) Drupal\Component\DependencyInjection\Container->createService(Array, 'class_resolver') (Line: 179) Drupal\Component\DependencyInjection\Container->get('class_resolver', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 239) Drupal\Component\DependencyInjection\Container->createService(Array, 'config.typed') (Line: 179) Drupal\Component\DependencyInjection\Container->get('config.typed', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 239) Drupal\Component\DependencyInjection\Container->createService(Array, 'config.factory') (Line: 179) Drupal\Component\DependencyInjection\Container->get('config.factory', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 239) Drupal\Component\DependencyInjection\Container->createService(Array, 'string_translator.locale.lookup') (Line: 179) Drupal\Component\DependencyInjection\Container->get('string_translator.locale.lookup', 1) (Line: 438) Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array) (Line: 275) Drupal\Component\DependencyInjection\Container->createService(Array, 'string_translation') (Line: 179) Drupal\Component\DependencyInjection\Container->get('string_translation') (Line: 197) Drupal::service('string_translation') (Line: 104) Drupal\Core\EventSubscriber\FinalExceptionSubscriber->getStringTranslation() (Line: 71) Drupal\Core\EventSubscriber\FinalExceptionSubscriber->t('The website encountered an unexpected error. Try again later.') (Line: 129) Drupal\Core\EventSubscriber\FinalExceptionSubscriber->onException(Object, 'kernel.exception', Object) call_user_func(Array, Object, 'kernel.exception', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.exception') (Line: 239) Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object, Object, 1) (Line: 91) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36) Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Any suggestions?
- 🇩🇪Germany Grevil
I synchronized the "class_resolver" service with the core "class_resolver" service in 📌 Automated Drupal 11 compatibility fixes for layout_builder_st Needs review , which fixed the issue!
- 🇬🇪Georgia almador
Hi, @grevil!
Maybe you could provide the final patch to solve the error?
Or prepare the more detailed instructions?
- 🇩🇪Germany Grevil
Hey @almador!
You could download the plain diff of https://git.drupalcode.org/project/layout_builder_st/-/merge_requests/16..., which is : https://git.drupalcode.org/project/layout_builder_st/-/merge_requests/16...