<div class="col-md-8 order-2 order-md-1 align-self-center p-static">
<h1 data-title-border>{{ hostal.nombre }}</h1>
<ul class="breadcrumb">
<li><a href="{{ path('homepage') }}">{{ 'Home'|trans }}</a></li>
<li><a href="{{ path('camino_index') }}">Caminos de Santiago</a></li>
<li><a class="active" href="{{ path('poblaciones_show', {'slug': hostal.poblacion.codigoseo}) }}">{{ hostal.poblacion.nombre}}</a></li>
</ul>
</div>
<div class="col-md-4 order-1 order-md-2 align-self-center">
<a class="btn btn-sm mt-4 btn-tertiary" href="{{ path('poblaciones_show', {'slug': hostal.poblacion.codigoseo}) }}">¿Quieres ver otros hospedajes en el municipio?</a>
</div>
</head>
<body>
";
// line 67
$this->displayBlock('body', $context, $blocks);
// line 68
echo "
<!-- Vendor -->
<script src=\"";
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
$macros = $this->macros;
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "hostales/show.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "hostales/show.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
public function render(array $context = []): string
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_get_args()[1] ?? []);
}
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
if ($v instanceof FormInterface) {
$parameters[$k] = $v->createView();
}
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*
* If an invalid form is found in the list of parameters, a 422 status code is returned.
* Forms found in parameters are auto-cast to form views.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
$response ??= new Response();
if (200 === $response->getStatusCode()) {
foreach ($parameters as $v) {
if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
//$statement->bindValue('id', 123);
$imagenes = $statement->fetchAll();
return $this->render('hostales/show.html.twig', [
'hostal' => $hostal,
'dormitorios' => $dormitorios,
'imagenes' => $imagenes
]);
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
foreach ($id as $key => $value) {
$ids[] = $key . '(' . $value . ')';
}
return new self(
'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found'
);
}
/**
return function (Proxy $proxy) use ($entityPersister, $classMetadata): void {
$identifier = $classMetadata->getIdentifierValues($proxy);
$entity = $entityPersister->loadById($identifier, $proxy->__isCloning ? null : $proxy);
if ($entity === null) {
throw EntityNotFoundException::fromClassNameAndIdentifier(
$classMetadata->getName(),
$this->identifierFlattener->flattenIdentifier($classMetadata, $identifier)
);
}
try {
if ($defaultProperties = array_diff_key(LazyObjectRegistry::$defaultProperties[$instance::class], $this->skippedProperties)) {
PublicHydrator::hydrate($instance, $defaultProperties);
}
($this->initializer)($instance);
} catch (\Throwable $e) {
$this->status = self::STATUS_UNINITIALIZED_FULL;
$this->reset($instance);
throw $e;
if ([$class, , $readonlyScope] = $propertyScopes[$name] ?? null) {
$scope = Registry::getScope($propertyScopes, $class, $name);
$state = $this->lazyObjectState ?? null;
if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"]))
&& LazyObjectState::STATUS_UNINITIALIZED_PARTIAL !== $state->initialize($this, $name, $readonlyScope ?? $scope)
) {
goto get_in_scope;
}
}
return $this;
}
public function getCodigoseo(): ?string
{
return $this->codigoseo;
}
public function setCodigoseo(string $codigoseo): self
{
$this->codigoseo = $codigoseo;
}
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
// line 14
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("camino_index");
echo "\">Caminos de Santiago</a></li>
<li><a class=\"active\" href=\"";
// line 15
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("poblaciones_show", ["slug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["hostal"]) || array_key_exists("hostal", $context) ? $context["hostal"] : (function () { throw new RuntimeError('Variable "hostal" does not exist.', 15, $this->source); })()), "poblacion", [], "any", false, false, false, 15), "codigoseo", [], "any", false, false, false, 15)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["hostal"]) || array_key_exists("hostal", $context) ? $context["hostal"] : (function () { throw new RuntimeError('Variable "hostal" does not exist.', 15, $this->source); })()), "poblacion", [], "any", false, false, false, 15), "nombre", [], "any", false, false, false, 15), "html", null, true);
echo "</a></li>
</ul>
</div>
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
</head>
<body>
";
// line 67
$this->displayBlock('body', $context, $blocks);
// line 68
echo "
<!-- Vendor -->
<script src=\"";
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
$macros = $this->macros;
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "hostales/show.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "hostales/show.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
public function render(array $context = []): string
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_get_args()[1] ?? []);
}
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
if ($v instanceof FormInterface) {
$parameters[$k] = $v->createView();
}
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*
* If an invalid form is found in the list of parameters, a 422 status code is returned.
* Forms found in parameters are auto-cast to form views.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
$response ??= new Response();
if (200 === $response->getStatusCode()) {
foreach ($parameters as $v) {
if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
//$statement->bindValue('id', 123);
$imagenes = $statement->fetchAll();
return $this->render('hostales/show.html.twig', [
'hostal' => $hostal,
'dormitorios' => $dormitorios,
'imagenes' => $imagenes
]);
}
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
[2/2]
RuntimeError
|
---|
Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Entity of type 'App\Entity\Poblaciones' for IDs id(0) was not found"). at templates/hostales/show.html.twig:15 at Twig\Template->displayBlock() (var/cache/dev/twig/14/146691ef3ace31af3131f1efcb5c2b67.php:176) at __TwigTemplate_e6f8b7bda70f5cbc4e71af684a9727a6->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (var/cache/dev/twig/41/41c3277cf5d2da0a93add7099f40f049.php:46) at __TwigTemplate_335ae9ab90c2eaef39770a963a247a92->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (vendor/twig/twig/src/Template.php:379) at Twig\Template->render() (vendor/twig/twig/src/TemplateWrapper.php:40) at Twig\TemplateWrapper->render() (vendor/twig/twig/src/Environment.php:280) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:242) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:253) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/HostalesController.php:43) at App\Controller\HostalesController->show() (vendor/symfony/http-kernel/HttpKernel.php:163) 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:184) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |
[1/2]
EntityNotFoundException
|
---|
Doctrine\ORM\EntityNotFoundException: Entity of type 'App\Entity\Poblaciones' for IDs id(0) was not found at vendor/doctrine/orm/lib/Doctrine/ORM/EntityNotFoundException.php:33 at Doctrine\ORM\EntityNotFoundException::fromClassNameAndIdentifier() (vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php:234) at Doctrine\ORM\Proxy\ProxyFactory->Doctrine\ORM\Proxy\{closure}() (vendor/symfony/var-exporter/Internal/LazyObjectState.php:95) at Symfony\Component\VarExporter\Internal\LazyObjectState->initialize() (vendor/symfony/var-exporter/LazyGhostTrait.php:175) at Proxies\__CG__\App\Entity\Poblaciones->__get() (src/Entity/Poblaciones.php:447) at App\Entity\Poblaciones->getCodigoseo() (vendor/twig/twig/src/Extension/CoreExtension.php:1635) at twig_get_attribute() (var/cache/dev/twig/41/41c3277cf5d2da0a93add7099f40f049.php:101) at __TwigTemplate_335ae9ab90c2eaef39770a963a247a92->block_body() (vendor/twig/twig/src/Template.php:171) at Twig\Template->displayBlock() (var/cache/dev/twig/14/146691ef3ace31af3131f1efcb5c2b67.php:176) at __TwigTemplate_e6f8b7bda70f5cbc4e71af684a9727a6->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (var/cache/dev/twig/41/41c3277cf5d2da0a93add7099f40f049.php:46) at __TwigTemplate_335ae9ab90c2eaef39770a963a247a92->doDisplay() (vendor/twig/twig/src/Template.php:394) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:367) at Twig\Template->display() (vendor/twig/twig/src/Template.php:379) at Twig\Template->render() (vendor/twig/twig/src/TemplateWrapper.php:40) at Twig\TemplateWrapper->render() (vendor/twig/twig/src/Environment.php:280) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:242) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:253) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/HostalesController.php:43) at App\Controller\HostalesController->show() (vendor/symfony/http-kernel/HttpKernel.php:163) 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:184) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |