Symfony Exception

HiddenLocationException

HTTP 404 Not Found

Cannot display Location because it is flagged as invisible.

Exception

eZ\Publish\Core\MVC\Exception\ HiddenLocationException

  1.         );
  2.         $request $this->requestStack->getCurrentRequest();
  3.         if (!$request || !$request->attributes->get(PreviewController::PREVIEW_PARAMETER_NAMEfalse)) {
  4.             if ($location->invisible || $location->hidden) {
  5.                 throw new HiddenLocationException($location'Cannot display Location because it is flagged as invisible.');
  6.             }
  7.         }
  8.         return $location;
  9.     }
  1.         }
  2.         if (isset($parameters['location']) && $parameters['location'] instanceof Location) {
  3.             $location $parameters['location'];
  4.         } elseif (isset($parameters['locationId'])) {
  5.             $location $this->loadLocation($parameters['locationId']);
  6.         } else {
  7.             $location null;
  8.         }
  9.         if (isset($parameters['content'])) {
  1.             return;
  2.         }
  3.         $parameterEvent = new FilterViewBuilderParametersEvent(clone $request);
  4.         $this->eventDispatcher->dispatch($parameterEventViewEvents::FILTER_BUILDER_PARAMETERS);
  5.         $view $viewBuilder->buildView($parameterEvent->getParameters()->all());
  6.         $this->eventDispatcher->dispatch(new PostBuildViewEvent($view));
  7.         $request->attributes->set('view'$view);
  8.         // View parameters are added as request attributes so that they are available as controller action parameters
  9.         $request->attributes->add($view->getParameters());
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  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.         if (false === $controller $this->resolver->getController($request)) {
  2.             throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.'$request->getPathInfo()));
  3.         }
  4.         $event = new ControllerEvent($this$controller$request$type);
  5.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER);
  6.         $controller $event->getController();
  7.         // controller arguments
  8.         $arguments $this->argumentResolver->getArguments($request$controller);
  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.     }
  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('/srv/web/sites/hotel-rosalpina.com/httpdocs/vendor/autoload_runtime.php') in public/index.php (line 5)
  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

HiddenLocationException
eZ\Publish\Core\MVC\Exception\HiddenLocationException:
Cannot display Location because it is flagged as invisible.

  at vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/MVC/Symfony/View/Builder/ContentViewBuilder.php:245
  at eZ\Publish\Core\MVC\Symfony\View\Builder\ContentViewBuilder->loadLocation()
     (vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/MVC/Symfony/View/Builder/ContentViewBuilder.php:97)
  at eZ\Publish\Core\MVC\Symfony\View\Builder\ContentViewBuilder->buildView()
     (vendor/ezsystems/ezplatform-kernel/eZ/Bundle/EzPublishCoreBundle/EventListener/ViewControllerListener.php:69)
  at eZ\Bundle\EzPublishCoreBundle\EventListener\ViewControllerListener->getController()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  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:140)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  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('/srv/web/sites/hotel-rosalpina.com/httpdocs/vendor/autoload_runtime.php')
     (public/index.php:5)