Response: HTTP/1.1 500 Internal Server Error Date: Sat, 15 Mar 2025 14:09:28 GMT Server: Apache/2.4.41 (Ubuntu) X-Debug-Exception: Attempted%20to%20load%20class%20%22OutputChannelExtension%22%20from%20namespace%20%22Web2PrintToolsBundle%5CTwig%22.%0ADid%20you%20forget%20a%20%22use%22%20statement%20for%20another%20namespace%3F X-Debug-Exception-File: %2Fvar%2Fwww%2Fhtml%2Fvar%2Fcache%2Fdev%2FContainerZl3XrRr%2FApp_KernelDevDebugContainer.php:1530 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 Attempted to load class "OutputChannelExtension" from namespace "Web2PrintToolsBundle\Twig". Did you forget a "use" statement for another namespace? (500 Internal Server Error)

Symfony Exception

ClassNotFoundError

HTTP 500 Internal Server Error

Attempted to load class "OutputChannelExtension" from namespace "Web2PrintToolsBundle\Twig".
Did you forget a "use" statement for another namespace?

Exception

Symfony\Component\ErrorHandler\Error\ ClassNotFoundError

  1.         $instance->addExtension(new \Twig\DeferredExtension\DeferredExtension());
  2.         $instance->addExtension(new \Twig\Extra\String\StringExtension(($this->privates['slugger'] ?? ($this->privates['slugger'] = new \Symfony\Component\String\Slugger\AsciiSlugger('en')))));
  3.         $instance->addExtension(new \Pimcore\Twig\Extension\AdminExtension($h));
  4.         $instance->addExtension(new \CustomerManagementFrameworkBundle\Twig\Extension\CmfFrontendUtilsExtension($f, ($this->services['CustomerManagementFrameworkBundle\\Helper\\JsConfigService'] ?? ($this->services['CustomerManagementFrameworkBundle\\Helper\\JsConfigService'] = new \CustomerManagementFrameworkBundle\Helper\JsConfigService())), ($this->services['CustomerManagementFrameworkBundle\\SegmentManager\\SegmentManagerInterface'] ?? $this->getSegmentManagerInterfaceService()), ($this->services['cmf.customer_exporter_manager'] ?? $this->load('getCmf_CustomerExporterManagerService'))));
  5.         $instance->addExtension(new \CustomerManagementFrameworkBundle\Twig\Extension\CmfUrlUtilsExtension($h$a, ($this->services['CustomerManagementFrameworkBundle\\CustomerView\\CustomerViewInterface'] ?? $this->getCustomerViewInterfaceService()), ($this->services['cmf.link-activity-definition.linkgenerator'] ?? $this->load('getCmf_Linkactivitydefinition_LinkgeneratorService'))));
  6.         $instance->addExtension(new \Web2PrintToolsBundle\Twig\OutputChannelExtension());
  7.         $instance->addExtension(new \FormBuilderBundle\Twig\Extension\StaticFormExtension(($this->services['FormBuilderBundle\\Assembler\\FormAssembler'] ?? $this->getFormAssemblerService())));
  8.         $instance->addExtension(new \FormBuilderBundle\Twig\Extension\FlashMessageExtension(($this->services['FormBuilderBundle\\Session\\FlashBagManagerInterface'] ?? $this->getFlashBagManagerInterfaceService())));
  9.         $instance->addExtension(new \Http\HttplugBundle\Collector\Twig\HttpMessageMarkupExtension($i$j));
  10.         $instance->addExtension(new \HWI\Bundle\OAuthBundle\Twig\Extension\OAuthExtension(new \HWI\Bundle\OAuthBundle\Templating\Helper\OAuthHelper(($this->privates['hwi_oauth.security.oauth_utils'] ?? $this->getHwiOauth_Security_OauthUtilsService()), $a)));
  11.         $instance->addGlobal('app'$p);
in /var/www/html/var/cache/dev/ContainerZl3XrRr/App_KernelDevDebugContainer.php -> get_Container_Private_TwigService (line 4278)
  1.      *
  2.      * @return \Pimcore\Bundle\CoreBundle\EventListener\Frontend\GlobalTemplateVariablesListener
  3.      */
  4.     protected function getGlobalTemplateVariablesListenerService()
  5.     {
  6.         $this->privates['Pimcore\\Bundle\\CoreBundle\\EventListener\\Frontend\\GlobalTemplateVariablesListener'] = $instance = new \Pimcore\Bundle\CoreBundle\EventListener\Frontend\GlobalTemplateVariablesListener(($this->services['Pimcore\\Http\\Request\\Resolver\\DocumentResolver'] ?? $this->getDocumentResolverService()), ($this->services['Pimcore\\Http\\Request\\Resolver\\EditmodeResolver'] ?? $this->getEditmodeResolverService()), ($this->services['.container.private.twig'] ?? $this->get_Container_Private_TwigService()));
  7.         $instance->setLogger(($this->privates['monolog.logger'] ?? $this->getMonolog_LoggerService()));
  8.         $instance->setPimcoreContextResolver(($this->services['Pimcore\\Http\\Request\\Resolver\\PimcoreContextResolver'] ?? $this->getPimcoreContextResolverService()));
  9.         return $instance;
in /var/www/html/var/cache/dev/ContainerZl3XrRr/App_KernelDevDebugContainer.php -> getGlobalTemplateVariablesListenerService (line 3146)
  1.         }, => 'onKernelController'], 15);
  2.         $instance->addListener('kernel.response', [=> function () {
  3.             return ($this->privates['Pimcore\\Bundle\\CoreBundle\\EventListener\\Frontend\\GlobalTemplateVariablesListener'] ?? $this->getGlobalTemplateVariablesListenerService());
  4.         }, => 'onKernelResponse'], 0);
  5.         $instance->addListener('kernel.request', [=> function () {
  6.             return ($this->privates['Pimcore\\Bundle\\CoreBundle\\EventListener\\Frontend\\GlobalTemplateVariablesListener'] ?? $this->getGlobalTemplateVariablesListenerService());
  7.         }, => 'onKernelRequest'], 700);
  8.         $instance->addListener('kernel.response', [=> function () {
  9.             return ($this->privates['Pimcore\\Bundle\\CoreBundle\\EventListener\\Frontend\\HardlinkCanonicalListener'] ?? $this->getHardlinkCanonicalListenerService());
  10.         }, => 'onKernelResponse'], 0);
  11.         $instance->addListener('kernel.request', [=> function () {
  1.         $this->sorted[$eventName] = [];
  2.         foreach ($this->listeners[$eventName] as &$listeners) {
  3.             foreach ($listeners as $k => &$listener) {
  4.                 if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && >= \count($listener)) {
  5.                     $listener[0] = $listener[0]();
  6.                     $listener[1] = $listener[1] ?? '__invoke';
  7.                 }
  8.                 $this->sorted[$eventName][] = $listener;
  9.             }
  10.         }
  1.             if (empty($this->listeners[$eventName])) {
  2.                 return [];
  3.             }
  4.             if (!isset($this->sorted[$eventName])) {
  5.                 $this->sortListeners($eventName);
  6.             }
  7.             return $this->sorted[$eventName];
  8.         }
  1.             $this->orphanedEvents[$this->currentRequestHash][] = $eventName;
  2.             return;
  3.         }
  4.         foreach ($this->dispatcher->getListeners($eventName) as $listener) {
  5.             $priority $this->getListenerPriority($eventName$listener);
  6.             $wrappedListener = new WrappedListener($listener instanceof WrappedListener $listener->getWrappedListener() : $listenernull$this->stopwatch$this);
  7.             $this->wrappedListeners[$eventName][] = $wrappedListener;
  8.             $this->dispatcher->removeListener($eventName$listener);
  9.             $this->dispatcher->addListener($eventName$wrappedListener$priority);
  1.         if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) {
  2.             $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.'$eventName));
  3.         }
  4.         $this->preProcess($eventName);
  5.         try {
  6.             $this->beforeDispatch($eventName$event);
  7.             try {
  8.                 $e $this->stopwatch->start($eventName'section');
  9.                 try {
  1.     {
  2.         $this->requestStack->push($request);
  3.         // request
  4.         $event = new RequestEvent($this$request$type);
  5.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  6.         if ($event->hasResponse()) {
  7.             return $this->filterResponse($event->getResponse(), $request$type);
  8.         }
  1.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in /var/www/html/public/index.php (line 36)
  1. $kernel \Pimcore\Bootstrap::kernel();
  2. // reset current request - will be read from request stack from now on
  3. Tool::setCurrentRequest(null);
  4. $response $kernel->handle($request);
  5. $response->send();
  6. $kernel->terminate($request$response);

Stack Trace

ClassNotFoundError
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "OutputChannelExtension" from namespace "Web2PrintToolsBundle\Twig".
Did you forget a "use" statement for another namespace?

  at /var/www/html/var/cache/dev/ContainerZl3XrRr/App_KernelDevDebugContainer.php:1530
  at ContainerZl3XrRr\App_KernelDevDebugContainer->get_Container_Private_TwigService()
     (/var/www/html/var/cache/dev/ContainerZl3XrRr/App_KernelDevDebugContainer.php:4278)
  at ContainerZl3XrRr\App_KernelDevDebugContainer->getGlobalTemplateVariablesListenerService()
     (/var/www/html/var/cache/dev/ContainerZl3XrRr/App_KernelDevDebugContainer.php:3146)
  at ContainerZl3XrRr\App_KernelDevDebugContainer->ContainerZl3XrRr\{closure}()
     (/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:245)
  at Symfony\Component\EventDispatcher\EventDispatcher->sortListeners()
     (/var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:76)
  at Symfony\Component\EventDispatcher\EventDispatcher->getListeners()
     (/var/www/html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:293)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->preProcess()
     (/var/www/html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:148)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:128)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (/var/www/html/vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (/var/www/html/vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (/var/www/html/public/index.php:36)