if (!$throw) {
return null;
}
throw new LoaderError($this->errorCache[$name]);
}
private function normalizeName(string $name): string
{
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name));
return new Source(file_get_contents($path), $name, $path);
}
public function getCacheKey(string $name): string
{
if (null === $path = $this->findTemplate($name)) {
return '';
}
$len = \strlen($this->rootPath);
if (0 === strncmp($this->rootPath, $path, $len)) {
return substr($path, $len);
*
* @internal
*/
public function getTemplateClass(string $name, int $index = null): string
{
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index);
}
/**
$class = static::class;
if (false !== $pos = strrpos($class, '___', -1)) {
$class = substr($class, 0, $pos);
}
} else {
$class = $this->env->getTemplateClass($template);
}
return $this->env->loadTemplate($class, $template, $index);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$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", "Partials/menu.html.twig"));
// line 1
$this->loadTemplate((("Partials/menu_" . $this->env->getFunction('currentLanguage')->getCallable()()) . ".html.twig"), "Partials/menu.html.twig", 1)->display($context);
$__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();
echo "\"><img src=\"pics/Ginvi-logo.svg\" alt=\"GINVI logo\"></a>
</div>
";
// line 7
$this->loadTemplate("Partials/menu.html.twig", "Partials/header_compact.html.twig", 7)->display(twig_array_merge($context, ["active" => (isset($context["active"]) || array_key_exists("active", $context) ? $context["active"] : (function () { throw new RuntimeError('Variable "active" does not exist.', 7, $this->source); })())]));
// line 8
echo "
</header>";
$__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();
\t";
// line 5
if (((isset($context["active"]) || array_key_exists("active", $context) ? $context["active"] : (function () { throw new RuntimeError('Variable "active" does not exist.', 5, $this->source); })()) == "error")) {
// line 6
echo "\t\t";
$this->loadTemplate("Partials/header_compact.html.twig", "layout.html.twig", 6)->display($context);
// line 7
echo "\t";
} else {
// line 8
echo "\t\t";
}
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();
// line 1
$context["active"] = "error";
// line 2
$this->parent = $this->loadTemplate("layout.html.twig", "Page/notfound.html.twig", 2);
$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();
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
$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", "Page/index.html.twig"));
// line 1
$this->loadTemplate([(("Page/" . (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 1, $this->source); })())) . ".html.twig"), "Page/notfound.html.twig"], "Page/index.html.twig", 1)->display($context);
$__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 (!$this->container->has('twig')) {
throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*/
/**
* Renders a view.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
if (null === $response) {
$response = new Response();
}
class PageController extends AbstractController
{
public function indexAction(Request $request, string $page): Response
{
return $this->render('Page/index.html.twig', [
'page' => $page,
]);
}
public function errorAction(Request $request): void
{
$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);
$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 (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use Maeve\JuliusCms\Kernel;
require_once 'vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool)$context['APP_DEBUG']);
};
No log messages
LoaderError
|
---|
Twig\Error\LoaderError: Unable to find template "Partials/menu_uploadfiles.html.twig" (looked into: /var/www/vhosts/ginvi.nl/httpdocs/templates, /var/www/vhosts/ginvi.nl/httpdocs/vendor/symfony/twig-bridge/Resources/views/Form) in "Partials/menu.html.twig" at line 1. at vendor/twig/twig/src/Loader/FilesystemLoader.php:227 at Twig\Loader\FilesystemLoader->findTemplate() (vendor/twig/twig/src/Loader/FilesystemLoader.php:131) at Twig\Loader\FilesystemLoader->getCacheKey() (vendor/twig/twig/src/Environment.php:264) at Twig\Environment->getTemplateClass() (vendor/twig/twig/src/Template.php:319) at Twig\Template->loadTemplate() (var/cache/prd/twig/d1/d122d03246588d80efedb490897b2782.php:40) at __TwigTemplate_774fa6e7d0b0459ec54544c31be73986->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/prd/twig/0a/0a7c6de84e7ffa630d4f007aac4c3155.php:51) at __TwigTemplate_f17bff6f32678f3b60a6bd4021087b98->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/prd/twig/ff/ffcc6cfc229a720bb23ea7eda8cacd59.php:54) at __TwigTemplate_bb45de633e96bb6d54c164778fd045b0->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/prd/twig/64/64a12e53a9db16d76cbd92ee915abac4.php:48) at __TwigTemplate_f63e6043d4fa82859c66434a06b10de0->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/TemplateWrapper.php:47) at Twig\TemplateWrapper->display() (var/cache/prd/twig/fc/fccc245f1045135afec8e2920295db42.php:40) at __TwigTemplate_fe9703069f0deadf0f1e9a2a226fb9e2->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:258) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:266) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Bundle/Controller/PageController.php:15) at Maeve\JuliusCms\Bundle\Controller\PageController->indexAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) 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('/var/www/vhosts/ginvi.nl/httpdocs/vendor/autoload_runtime.php') (index.php/:5) |