Error 500 Internal Server Error

GET https://kiwisulu.2le-test.me/solution-de-sauvegarde-externalisee

Exceptions

Impossible to access an attribute ("content") on a null variable.

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
    """
}
  1. {% macro button(text, internalPage, externalPage, isExternal, theme = 'secondary', classes = '') %}
  2.     {% if internalPage or externalPage %}
  3.         {% if isExternal == false %}
  4.             {% set page = sulu_content_path(sulu_content_load(internalPage, {'url': 'url'}).content.url) %}
  5.         {% else %}
  6.             {% set page = externalPage %}
  7.         {% endif %}
  8.     {% else %}
  9.         {% set page = '#' %}
  1.                 // line 3
  2.                 echo "        ";
  3.                 if (((isset($context["isExternal"]) || array_key_exists("isExternal"$context) ? $context["isExternal"] : (function () { throw new RuntimeError('Variable "isExternal" does not exist.'3$this->source); })()) == false)) {
  4.                     // line 4
  5.                     echo "            ";
  6.                     $context["page"] = $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse4), "url", [], "any"falsefalsefalse4));
  7.                     // line 5
  8.                     echo "        ";
  9.                 } else {
  10.                     // line 6
  11.                     echo "            ";
  1.         }
  2.         throw new RuntimeError(sprintf('Macro "%s" is not defined in template "%s".'substr($method\strlen('macro_')), $template->getTemplateName()), $lineno$source);
  3.     }
  4.     return $template->$method(...$args);
  5. }
  6. /**
  7.  * @internal
  8.  */
  1.             if ((twig_get_attribute($this->env$this->source$context["column"], "text_cta", [], "any"falsefalsefalse27) && (twig_get_attribute($this->env$this->source$context["column"], "internal_page", [], "any"falsefalsefalse27) || twig_get_attribute($this->env$this->source$context["column"], "external_page", [], "any"falsefalsefalse27)))) {
  2.                 // line 28
  3.                 echo "                    <div class=\"mt-3\">
  4.                         ";
  5.                 // line 29
  6.                 echo twig_call_macro($macros["macros"], "macro_button", [twig_get_attribute($this->env$this->source$context["column"], "text_cta", [], "any"falsefalsefalse29), twig_get_attribute($this->env$this->source$context["column"], "internal_page", [], "any"falsefalsefalse29), twig_get_attribute($this->env$this->source$context["column"], "external_page", [], "any"falsefalsefalse29), twig_get_attribute($this->env$this->source$context["column"], "isExternal", [], "any"falsefalsefalse29)], 29$context$this->getSourceContext());
  7.                 echo "
  8.                     </div>
  9.                 ";
  10.             }
  11.             // line 32
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.             $context['loop']['last'] = === $length;
  2.         }
  3.         foreach ($context['_seq'] as $context["_key"] => $context["block"]) {
  4.             // line 8
  5.             echo "        ";
  6.             $this->loadTemplate((("includes/blocks/_" twig_get_attribute($this->env$this->source$context["block"], "type", [], "any"falsefalsefalse8)) . ".html.twig"), "pages/default.html.twig"8)->display(twig_array_merge($context, ["block" => $context["block"]]));
  7.             // line 9
  8.             echo "    ";
  9.             ++$context['loop']['index0'];
  10.             ++$context['loop']['index'];
  11.             $context['loop']['first'] = false;
in vendor/twig/twig/src/Template.php -> block_content (line 171)
  1.             throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2.         }
  3.         if (null !== $template) {
  4.             try {
  5.                 $template->$block($context$blocks);
  6.             } catch (Error $e) {
  7.                 if (!$e->getSourceContext()) {
  8.                     $e->setSourceContext($template->getSourceContext());
  9.                 }
  1.         echo "        </header>
  2.         <main class=\"container-fluid\">
  3.             ";
  4.         // line 196
  5.         $this->displayBlock('content'$context$blocks);
  6.         // line 197
  7.         echo "        </main>
  8.         ";
  9.         // line 199
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""pages/default.html.twig"));
  3.         $this->parent $this->loadTemplate("base.html.twig""pages/default.html.twig"1);
  4.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  5.         
  6.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  7.         
  8.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
in vendor/twig/twig/src/Template.php -> display (line 379)
  1.             ob_start();
  2.         } else {
  3.             ob_start(function () { return ''; });
  4.         }
  5.         try {
  6.             $this->display($context);
  7.         } catch (\Throwable $e) {
  8.             while (ob_get_level() > $level) {
  9.                 ob_end_clean();
  10.             }
  1.     public function render(array $context = []): string
  2.     {
  3.         // using func_get_args() allows to not expose the blocks argument
  4.         // as it should only be used by internal code
  5.         return $this->template->render($context\func_get_args()[1] ?? []);
  6.     }
  7.     public function display(array $context = [])
  8.     {
  9.         // using func_get_args() allows to not expose the blocks argument
  1.      * @throws SyntaxError  When an error occurred during compilation
  2.      * @throws RuntimeError When an error occurred during rendering
  3.      */
  4.     public function render($name, array $context = []): string
  5.     {
  6.         return $this->load($name)->render($context);
  7.     }
  8.     /**
  9.      * Displays a template.
  10.      *
  1.             if ($v instanceof FormInterface) {
  2.                 $parameters[$k] = $v->createView();
  3.             }
  4.         }
  5.         return $this->container->get('twig')->render($view$parameters);
  6.     }
  7.     /**
  8.      * Renders a view.
  9.      *
  1.                 $viewTemplate,
  2.                 $data
  3.             );
  4.         } else {
  5.             $content $this->renderView(
  6.                 $viewTemplate,
  7.                 $data
  8.             );
  9.         }
  10.         $response = new Response($content);
  1.      * @return Response
  2.      */
  3.     public function indexAction(StructureInterface $structure$preview false$partial false)
  4.     {
  5.         $response $this->renderStructure(
  6.             $structure,
  7.             [],
  8.             $preview,
  9.             $partial
  10.         );
in vendor/symfony/http-kernel/HttpKernel.php -> indexAction (line 166)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  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 (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  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.     }
Kernel->handle() in public/index.php (line 66)
  1. // When using the HttpCache, you need to call the method in your front controller
  2. // instead of relying on the configuration parameter
  3. // https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
  4. Request::enableHttpMethodParameterOverride();
  5. $request Request::createFromGlobals();
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $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)