Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Notice: Undefined index: locationId

Exception

ErrorException

  1.         // Looking at legacy site access only
  2.         if( in_array$this->siteAccessService->getCurrent()->name, [ 'site''webin''legacy_admin' ] ) )
  3.         {
  4.             $legacyMatches $this->configResolver->getParameter'url_alias_router''csm' );
  5.             if( in_array$parameters'locationId' ], $legacyMatches'location_ids' ] ) )
  6.             {
  7.                 return false;
  8.             }
  9.             if( $parameters'contentId' ] )
UrlAliasRouter->isLegacyRoute() in src/Bundle/CsmBundle/Routing/UrlAliasRouter.php (line 49)
  1.     public function matchRequest(Request $request): array
  2.     {
  3.         $parameters CoreUrlAliasRouter::matchRequest($request);
  4.         if( $this->isLegacyRoute$parameters ) )
  5.         {
  6.             throw new ResourceNotFoundException'Let legacy response to this request.' );
  7.         }
  8.         else
  9.         {
  1.                 if ($router instanceof RequestMatcherInterface) {
  2.                     if (null === $requestForMatching) {
  3.                         $requestForMatching $this->rebuildRequest($pathinfo);
  4.                     }
  5.                     return $router->matchRequest($requestForMatching);
  6.                 }
  7.                 // every router implements the match method
  8.                 return $router->match($pathinfo);
  9.             } catch (ResourceNotFoundException $e) {
  1.      *
  2.      * Loops through all routes and tries to match the passed request.
  3.      */
  4.     public function matchRequest(Request $request)
  5.     {
  6.         return $this->doMatch($request->getPathInfo(), $request);
  7.     }
  8.     /**
  9.      * Loops through all routers and tries to match the passed request or url.
  10.      *
  1.         // add attributes based on the request (routing)
  2.         try {
  3.             // matching a request is more powerful than matching a URL path + context, so try that first
  4.             if ($this->matcher instanceof RequestMatcherInterface) {
  5.                 $parameters $this->matcher->matchRequest($request);
  6.             } else {
  7.                 $parameters $this->matcher->match($request->getPathInfo());
  8.             }
  9.             if (null !== $this->logger) {
  1.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  2.         $e $this->stopwatch->start($this->name'event_listener');
  3.         try {
  4.             ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         } finally {
  6.             if ($e->isStarted()) {
  7.                 $e->stop();
  8.             }
  9.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  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.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/mnt/data/www.csmonitor.com/vendor/autoload_runtime.php') in public/index.php (line 4)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

No log messages

Stack Trace

ErrorException
ErrorException:
Notice: Undefined index: locationId

  at src/Bundle/CsmBundle/Routing/UrlAliasRouter.php:77
  at CsmBundle\Routing\UrlAliasRouter->isLegacyRoute()
     (src/Bundle/CsmBundle/Routing/UrlAliasRouter.php:49)
  at CsmBundle\Routing\UrlAliasRouter->matchRequest()
     (vendor/symfony-cmf/routing/src/ChainRouter.php:188)
  at Symfony\Cmf\Component\Routing\ChainRouter->doMatch()
     (vendor/symfony-cmf/routing/src/ChainRouter.php:158)
  at Symfony\Cmf\Component\Routing\ChainRouter->matchRequest()
     (vendor/symfony/http-kernel/EventListener/RouterListener.php:111)
  at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:35)
  at require_once('/mnt/data/www.csmonitor.com/vendor/autoload_runtime.php')
     (public/index.php:4)