{% block breatcome %}
<div class="breatcome_content" style="text-align: left">
<ul>
<li>
<a href="{{path('site_homepage')}}">Acasa</a>
<i class="fa fa-angle-right"></i><a href="{{path('site_category', {"slug": art.category.slug, "id": art.category.id})}}">{{art.category.name}}</a>
<i class="fa fa-angle-right"></i><br> <span>{{ art.title }}</span>
</li>
</ul>
</div>
{% endblock breatcome %}
// line 7
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("site_homepage");
echo "\">Acasa</a>
<i class=\"fa fa-angle-right\"></i><a href=\"";
// line 8
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("site_category", ["slug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["art"]) || array_key_exists("art", $context) ? $context["art"] : (function () { throw new Twig_Error_Runtime('Variable "art" does not exist.', 8, $this->source); })()), "category", []), "slug", []), "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["art"]) || array_key_exists("art", $context) ? $context["art"] : (function () { throw new Twig_Error_Runtime('Variable "art" does not exist.', 8, $this->source); })()), "category", []), "id", [])]), "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["art"]) || array_key_exists("art", $context) ? $context["art"] : (function () { throw new Twig_Error_Runtime('Variable "art" does not exist.', 8, $this->source); })()), "category", []), "name", []), "html", null, true);
echo "</a>
<i class=\"fa fa-angle-right\"></i><br> <span>";
// line 9
protected function doDisplay(array $context, array $blocks = [])
{
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "default/profile.html.twig"));
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
* {@inheritdoc}
*/
public function render($name, array $parameters = array())
{
try {
return parent::render($name, $parameters);
} catch (Error $e) {
if ($name instanceof TemplateReference && !method_exists($e, 'setSourceContext')) {
try {
// try to get the real name of the template where the error occurred
$name = $e->getTemplateName();
* @return Response A Response instance
*/
protected function render($view, array $parameters = array(), Response $response = null)
{
if ($this->container->has('templating')) {
$content = $this->container->get('templating')->render($view, $parameters);
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available.');
}
$articol = $em->getRepository("AppBundle:Articol")->findOneById($id);
$declarations = $em->getRepository("AppBundle:Declaratii")->findByFilterAlphaQB('2', '1');
$declarations2 = $em->getRepository("AppBundle:Declaratii")->findByFilterAlphaAfQB('2', '2');
//dump($articol);die;
return $this->render('default/profile.html.twig', ['art' => $articol, 'declarations' => $declarations, 'declarations2' => $declarations2]);
}
/**
* @Route("d/{id}/{name}", name="site_declaratii")
*/
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
Twig_Error_Runtime |
---|
Twig_Error_Runtime: Impossible to access an attribute ("category") on a null variable. at app/Resources/views/default/profile.html.twig:8 at twig_get_attribute(object(Twig_Environment), object(Twig_Source), null, 'category', array()) (var/cache/prod/twig/67/67ddb3acb4bb782b77cd2e895648ea7b8bd483b350957e5ec3c0213d80f67af6.php:56) at __TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4->block_breatcome(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/', 'current' => 'site_profil', 'l' => 'ro'), array('css' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_css'), 'breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'modal' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_modal'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (vendor/twig/twig/lib/Twig/Template.php:189) at Twig_Template->displayBlock('breatcome', array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/', 'current' => 'site_profil', 'l' => 'ro'), array('css' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_css'), 'breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'modal' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_modal'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (var/cache/prod/twig/51/514d9d19dd79feaa626057dd74f17d42c3545430e9e253029bdd456af09241fe.php:288) at __TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d->doDisplay(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/', 'current' => 'site_profil', 'l' => 'ro'), array('css' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_css'), 'breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'modal' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_modal'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (vendor/twig/twig/lib/Twig/Template.php:386) at Twig_Template->displayWithErrorHandling(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/'), array('css' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_css'), 'breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'modal' => array(object(__TwigTemplate_59061e51c0c29182a9a55e6b3491b1c44fa3f6cb3238c45b5a7c559c5f4b5f0d), 'block_modal'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (vendor/twig/twig/lib/Twig/Template.php:363) at Twig_Template->display(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/'), array('breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (var/cache/prod/twig/67/67ddb3acb4bb782b77cd2e895648ea7b8bd483b350957e5ec3c0213d80f67af6.php:34) at __TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4->doDisplay(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/'), array('breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (vendor/twig/twig/lib/Twig/Template.php:386) at Twig_Template->displayWithErrorHandling(array('art' => null, 'declarations' => array(), 'declarations2' => array(), 'assetic' => array('debug' => true, 'vars' => object(ValueContainer), 'use_controller' => true), 'app' => object(AppVariable), 'urlu' => 'http://primariacraiova.ro/ro/'), array('breatcome' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_breatcome'), 'title' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_title'), 'body' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_body'), 'javascript' => array(object(__TwigTemplate_f70536f58a518fe6eec4b172bb63f6d13e33f44a13267c0e5244c80a822817a4), 'block_javascript'))) (vendor/twig/twig/lib/Twig/Template.php:363) at Twig_Template->display(array('art' => null, 'declarations' => array(), 'declarations2' => array())) (vendor/twig/twig/lib/Twig/Template.php:371) at Twig_Template->render(array('art' => null, 'declarations' => array(), 'declarations2' => array())) (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49) at Symfony\Bridge\Twig\TwigEngine->render('default/profile.html.twig', array('art' => null, 'declarations' => array(), 'declarations2' => array())) (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45) at Symfony\Bundle\TwigBundle\TwigEngine->render('default/profile.html.twig', array('art' => null, 'declarations' => array(), 'declarations2' => array())) (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:234) at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('default/profile.html.twig', array('art' => null, 'declarations' => array(), 'declarations2' => array())) (src/AppBundle/Controller/DefaultController.php:78) at AppBundle\Controller\DefaultController->profileAction(object(Request), 'beldeanu-gegiu-andreea-loredana', '1420') (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:169) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (web/app.php:19) |