Exceptions
Exception
Twig\Error\ RuntimeError
Show exception properties
Twig\Error\RuntimeError {#25138 -lineno: 4 -name: "macros.html.twig" -rawMessage: "Impossible to access an attribute ("content") on a null variable." -sourcePath: "/var/www/html/templates/macros.html.twig" -sourceCode: """ {% macro button(text, internalPage, externalPage, isExternal, theme = 'secondary', classes = '') %}\n {% if internalPage or externalPage %}\n {% if isExternal == false %}\n {% set page = sulu_content_path(sulu_content_load(internalPage, {'url': 'url'}).content.url) %}\n {% else %}\n {% set page = externalPage %}\n {% endif %}\n {% else %}\n {% set page = '#' %}\n {% endif %}\n \n <a class="btn btn-outline-{{ theme }} {{ classes }}" href="{{ page }}" {% if isExternal == true %}target="_blank"{% endif %}>\n {{ text|upper|nbsp|break|raw }}\n </a>\n {% endmacro %}\n \n \n {% macro link(text, internalPage, externalPage, isExternal, classes = '') %}\n {% if internalPage or externalPage %}\n {% if isExternal == false %}\n {% set page = sulu_content_path(sulu_content_load(internalPage, {'url': 'url'}).content.url) %}\n {% else %}\n {% set page = externalPage %}\n {% endif %}\n {% else %}\n {% set page = '#' %}\n {% endif %}\n \n <a class="text-dark text-hover-primary {{ classes }}" href="{{ page }}" {% if isExternal == true %}target="_blank"{% endif %}>\n {{ text|nbsp|raw }}\n </a>\n {% endmacro %}\n """ }
in
templates/macros.html.twig
(line 4)
{% macro button(text, internalPage, externalPage, isExternal, theme = 'secondary', classes = '') %}{% if internalPage or externalPage %}{% if isExternal == false %}{% set page = sulu_content_path(sulu_content_load(internalPage, {'url': 'url'}).content.url) %}{% else %}{% set page = externalPage %}{% endif %}{% else %}{% set page = '#' %}
in
var/cache/website/dev/twig/27/27cefcee2c28db18ed35f770d468e82c.php
twig_get_attribute
(line 86)
// line 3echo " ";if (((isset($context["isExternal"]) || array_key_exists("isExternal", $context) ? $context["isExternal"] : (function () { throw new RuntimeError('Variable "isExternal" does not exist.', 3, $this->source); })()) == false)) {// line 4echo " ";$context["page"] = $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $this->env->getFunction('sulu_content_load')->getCallable()((isset($context["internalPage"]) || array_key_exists("internalPage", $context) ? $context["internalPage"] : (function () { throw new RuntimeError('Variable "internalPage" does not exist.', 4, $this->source); })()), ["url" => "url"]), "content", [], "any", false, false, false, 4), "url", [], "any", false, false, false, 4));// line 5echo " ";} else {// line 6echo " ";
in
vendor/twig/twig/src/Extension/CoreExtension.php
->
macro_button
(line 1228)
}throw new RuntimeError(sprintf('Macro "%s" is not defined in template "%s".', substr($method, \strlen('macro_')), $template->getTemplateName()), $lineno, $source);}return $template->$method(...$args);}/*** @internal*/
in
var/cache/website/dev/twig/3a/3a05a316cb6a0420a07ec1da1869c31b.php
twig_call_macro
(line 121)
if ((twig_get_attribute($this->env, $this->source, $context["column"], "text_cta", [], "any", false, false, false, 27) && (twig_get_attribute($this->env, $this->source, $context["column"], "internal_page", [], "any", false, false, false, 27) || twig_get_attribute($this->env, $this->source, $context["column"], "external_page", [], "any", false, false, false, 27)))) {// line 28echo " <div class=\"mt-3\">";// line 29echo twig_call_macro($macros["macros"], "macro_button", [twig_get_attribute($this->env, $this->source, $context["column"], "text_cta", [], "any", false, false, false, 29), twig_get_attribute($this->env, $this->source, $context["column"], "internal_page", [], "any", false, false, false, 29), twig_get_attribute($this->env, $this->source, $context["column"], "external_page", [], "any", false, false, false, 29), twig_get_attribute($this->env, $this->source, $context["column"], "isExternal", [], "any", false, false, false, 29)], 29, $context, $this->getSourceContext());echo "</div>";}// line 32
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 394)
}protected function displayWithErrorHandling(array $context, array $blocks = []){try {$this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
displayWithErrorHandling
(line 367)
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();
in
var/cache/website/dev/twig/7a/7a49cc0c8d1575f2cbfcd942e514cc51.php
->
display
(line 95)
$context['loop']['last'] = 1 === $length;}foreach ($context['_seq'] as $context["_key"] => $context["block"]) {// line 8echo " ";$this->loadTemplate((("includes/blocks/_" . twig_get_attribute($this->env, $this->source, $context["block"], "type", [], "any", false, false, false, 8)) . ".html.twig"), "pages/default.html.twig", 8)->display(twig_array_merge($context, ["block" => $context["block"]]));// line 9echo " ";++$context['loop']['index0'];++$context['loop']['index'];$context['loop']['first'] = false;
in
vendor/twig/twig/src/Template.php
->
block_content
(line 171)
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());}
in
var/cache/website/dev/twig/00/00f2c44a26dff8a076a4a39eee1f449a.php
->
displayBlock
(line 358)
echo " </header><main class=\"container-fluid\">";// line 196$this->displayBlock('content', $context, $blocks);// line 197echo " </main>";// line 199
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 394)
}protected function displayWithErrorHandling(array $context, array $blocks = []){try {$this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
displayWithErrorHandling
(line 367)
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();
in
var/cache/website/dev/twig/7a/7a49cc0c8d1575f2cbfcd942e514cc51.php
->
display
(line 48)
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "pages/default.html.twig"));$this->parent = $this->loadTemplate("base.html.twig", "pages/default.html.twig", 1);$this->parent->display($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 394)
}protected function displayWithErrorHandling(array $context, array $blocks = []){try {$this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
displayWithErrorHandling
(line 367)
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();
in
vendor/twig/twig/src/Template.php
->
display
(line 379)
ob_start();} else {ob_start(function () { return ''; });}try {$this->display($context);} catch (\Throwable $e) {while (ob_get_level() > $level) {ob_end_clean();}
in
vendor/twig/twig/src/TemplateWrapper.php
->
render
(line 40)
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 codereturn $this->template->render($context, \func_get_args()[1] ?? []);}public function display(array $context = []){// using func_get_args() allows to not expose the blocks argument
in
vendor/twig/twig/src/Environment.php
->
render
(line 280)
* @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.*
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
render
(line 243)
if ($v instanceof FormInterface) {$parameters[$k] = $v->createView();}}return $this->container->get('twig')->render($view, $parameters);}/*** Renders a view.*
in
vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/WebsiteController.php
->
renderView
(line 81)
$viewTemplate,$data);} else {$content = $this->renderView($viewTemplate,$data);}$response = new Response($content);
in
vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/DefaultController.php
->
renderStructure
(line 34)
* @return Response*/public function indexAction(StructureInterface $structure, $preview = false, $partial = false){$response = $this->renderStructure($structure,[],$preview,$partial);
in
vendor/symfony/http-kernel/HttpKernel.php
->
indexAction
(line 166)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 74)
{$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;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 197)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
// When using the HttpCache, you need to call the method in your front controller// instead of relying on the configuration parameter// https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-overrideRequest::enableHttpMethodParameterOverride();$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response);
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 08:02:25 | doctrine |
Connecting with parameters {params} {
"params": {
"driver": "pdo_mysql",
"host": "nodea",
"port": 3306,
"user": "kiwisulu",
"password": "<redacted>",
"driverOptions": [],
"defaultTableOptions": {
"collation": "utf8mb4_unicode_ci"
},
"dbname": "kiwisulu_test",
"charset": "utf8mb4"
}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\MetadataSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\UserBlameSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Doctrine\ReferencesOption" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Doctrine\ORM\Tools\ResolveTargetEntityListener" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Massive\Bundle\SearchBundle\Search\EventSubscriber\DoctrineOrmSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\TimestampableSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Bundle\SecurityBundle\EventListener\PermissionInheritanceSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Bundle\RedirectBundle\GoneSubscriber\GoneEntitySubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Bundle\ActivityBundle\Infrastructure\Doctrine\Subscriber\DomainEventCollectorSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] attribute. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Using XML mapping driver with XSD validation disabled is deprecated and will not be supported in Doctrine ORM 3.0. (XmlDriver.php:64 called by SimplifiedXmlDriver.php:23, https://github.com/doctrine/orm/pull/6728, package doctrine/orm) {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:82 called by App_KernelDevDebugContainer.php:1441, https://github.com/doctrine/orm/pull/10455, package doctrine/orm) {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: The annotation mapping driver is deprecated and will be removed in Doctrine ORM 3.0, please migrate to the attribute or XML driver. (AnnotationDriver.php:69 called by App_KernelDevDebugContainer.php:1456, https://github.com/doctrine/orm/issues/10098, package doctrine/orm) {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Short namespace aliases such as "SuluMediaBundle:Collection" are deprecated and will be removed in Doctrine ORM 3.0. (EntityManager.php:811 called by App_KernelDevDebugContainer.php:2660, https://github.com/doctrine/orm/issues/8818, package doctrine/orm) {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Short namespace aliases such as "SuluMediaBundle:Collection" are deprecated, use ::class constant instead. (AbstractClassMetadataFactory.php:254 called by EntityManager.php:318, https://github.com/doctrine/persistence/issues/204, package doctrine/persistence) {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::getXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "getDefaultLocalization" instead. {
"exception": {}
}
|
| INFO 08:02:25 | php |
User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::setXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "setDefaultLocalization" instead. {
"exception": {}
}
|
| INFO 08:02:25 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "4c4a4b"
},
"request_uri": "https://kiwisulu.2le-test.me/_profiler/4c4a4b",
"method": "GET"
}
|
| INFO 08:02:25 | php |
User Deprecated: Class "Nyholm\Psr7\Factory\HttplugFactory" is deprecated since version 1.8, use "Nyholm\Psr7\Factory\Psr17Factory" instead. {
"exception": {}
}
|
Stack Trace
|
RuntimeError
|
|---|
Twig\Error\RuntimeError:
Impossible to access an attribute ("content") on a null variable.
at templates/macros.html.twig:4
at twig_get_attribute()
(var/cache/website/dev/twig/27/27cefcee2c28db18ed35f770d468e82c.php:86)
at __TwigTemplate_43c06275c3078ea23be257bb79a65192->macro_button()
(vendor/twig/twig/src/Extension/CoreExtension.php:1228)
at twig_call_macro()
(var/cache/website/dev/twig/3a/3a05a316cb6a0420a07ec1da1869c31b.php:121)
at __TwigTemplate_fdec85172a1e3ef813267461f1506cca->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/website/dev/twig/7a/7a49cc0c8d1575f2cbfcd942e514cc51.php:95)
at __TwigTemplate_8b74842a8b8390b9a6120334eccfdca7->block_content()
(vendor/twig/twig/src/Template.php:171)
at Twig\Template->displayBlock()
(var/cache/website/dev/twig/00/00f2c44a26dff8a076a4a39eee1f449a.php:358)
at __TwigTemplate_6482cbac8127b8e2afdd137f431e624c->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/website/dev/twig/7a/7a49cc0c8d1575f2cbfcd942e514cc51.php:48)
at __TwigTemplate_8b74842a8b8390b9a6120334eccfdca7->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:243)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView()
(vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/WebsiteController.php:81)
at Sulu\Bundle\WebsiteBundle\Controller\WebsiteController->renderStructure()
(vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/DefaultController.php:34)
at Sulu\Bundle\WebsiteBundle\Controller\DefaultController->indexAction()
(vendor/symfony/http-kernel/HttpKernel.php:166)
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:197)
at Symfony\Component\HttpKernel\Kernel->handle()
(public/index.php:66)
|