Error 500 Internal Server Error

GET https://pprd-anselmi.openstudio-lab.com/serviette-40x40-3c-1-8-saumon-p%C3%AAche-00n00--1.html

Forwarded to ErrorController (10fa59)

Exceptions

Call to a member function setLocale() on null

Exception

Error

  1. $pageEntity = ProductQuery::create()->findPk($this->requestStack->getCurrentRequest()?->get('product_id'));
  2. break;
  3. default:
  4. return null;
  5. }
  6. return htmlspecialchars($pageEntity->setLocale($this->requestStack->getSession()->getLang()->getLocale())->getTitle());
  7. }
  8. /**
  9. * @throws PropelException
  10. */
GoogleTagService->getPageName('product') in local/modules/GoogleTagManager/Service/GoogleTagService.php (line 70)
  1. $result['user']['umd'] = hash('md5', $user->getEmail());
  2. $result['user']['ush'] = hash('sha256', $user->getEmail());
  3. }
  4. if (in_array($pageType, ['category', 'product'])) {
  5. $result['google_tag_params']['ecomm_category'] = $this->getPageName($view);
  6. }
  7. if ($pageType === 'product') {
  8. $result['google_tag_params']['ecomm_prodid'] = $this->getPageProductRef($view);
  9. }
GoogleTagService->getTheliaPageViewParameters() in local/modules/GoogleTagManager/Hook/FrontHook.php (line 64)
  1. $gtmId = GoogleTagManager::getConfigValue(GoogleTagManager::GOOGLE_TAG_MANAGER_GMT_ID_CONFIG_KEY);
  2. if ("" !== $gtmId) {
  3. $view = $request?->get('_view');
  4. $event->add($this->render('datalayer/thelia-page-view.html', ['data' => $this->googleTagService->getTheliaPageViewParameters()]));
  5. if (in_array($view, ['category', 'brand', 'search'])) {
  6. $event->add($this->render('datalayer/view-item-list.html', ['eventName' => 'view_item_list']));
  7. }
  1. $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
  2. $e = $this->stopwatch->start($this->name, 'event_listener');
  3. try {
  4. ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
  5. } finally {
  6. if ($e->isStarted()) {
  7. $e->stop();
  8. }
  9. }
  1. foreach ($listeners as $listener) {
  2. if ($stoppable && $event->isPropagationStopped()) {
  3. break;
  4. }
  5. $listener($event, $eventName, $this);
  6. }
  7. }
  8. /**
  9. * Sorts the internal list of listeners for the given event by priority.
  1. } else {
  2. $listeners = $this->getListeners($eventName);
  3. }
  4. if ($listeners) {
  5. $this->callListeners($listeners, $eventName, $event);
  6. }
  7. return $event;
  8. }
  1. try {
  2. $this->beforeDispatch($eventName, $event);
  3. try {
  4. $e = $this->stopwatch->start($eventName, 'section');
  5. try {
  6. $this->dispatcher->dispatch($event, $eventName);
  7. } finally {
  8. if ($e->isStarted()) {
  9. $e->stop();
  10. }
  11. }
TraceableEventDispatcher->dispatch(object(HookRenderEvent), 'hook.1.main.head-top') in local/modules/TheliaSmarty/Template/Plugins/Hook.php (line 111)
  1. }
  2. if (0 !== $module) {
  3. $eventName .= '.'.$module;
  4. }
  5. $this->getDispatcher()->dispatch($event, $eventName);
  6. $content = trim($event->dump());
  7. if ($this->debug && $smarty->getRequest()->get('SHOW_HOOK')) {
  8. $content = self::showHook(
Hook->processHookFunction(array('name' => 'main.head-top'), object(Smarty_Internal_Template)) in local/modules/TheliaSmarty/Template/AbstractSmartyPlugin.php (line 116)
  1. $functionName = str_replace(self::WRAPPED_METHOD_PREFIX, '', $functionName);
  2. $params = $args[0] ?? [];
  3. $smarty = $args[1] ?? null;
  4. return $this->$functionName($params, $smarty);
  5. }
  6. throw new \BadMethodCallException("Smarty plugin method '$functionName' was not found.", $this, $functionName);
  7. }
  1. <?php
  2. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_877301655693a89a804f5f5_46794601', "share-meta");
  3. ?>
  4. <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('name'=>"main.head-top"),$_smarty_tpl ) );?>
  5. <link
  6. href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
  1. if ($_template->startRenderCallbacks) {
  2. foreach ($_template->startRenderCallbacks as $callback) {
  3. call_user_func($callback, $_template);
  4. }
  5. }
  6. $unifunc($_template);
  7. foreach ($_template->endRenderCallbacks as $callback) {
  8. call_user_func($callback, $_template);
  9. }
  10. $_template->isRenderingCache = false;
  11. } catch (Exception $e) {
  1. array_merge($_template->cached->file_dependency, $this->file_dependency);
  2. }
  3. if ($_template->source->handler->uncompiled) {
  4. $_template->source->handler->renderUncompiled($_template->source, $_template);
  5. } else {
  6. $this->getRenderedTemplateCode($_template);
  7. }
  8. if ($_template->caching && $this->has_nocache_code) {
  9. $_template->cached->hashes[ $this->nocache_hash ] = true;
  10. }
  11. if ($_template->smarty->debugging) {
  1. $this->cached->render($this, $no_output_filter);
  2. } else {
  3. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
  4. $this->loadCompiled(true);
  5. }
  6. $this->compiled->render($this);
  7. }
  8. // display or fetch
  9. if ($display) {
  10. if ($this->caching && $this->smarty->cache_modified_check) {
  11. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
  1. }
  2. } else {
  3. if (isset($tpl->compiled)) {
  4. $tpl->compiled->render($tpl);
  5. } else {
  6. $tpl->render();
  7. }
  8. }
  9. }
  10. /**
  1. $this->state = 2;
  2. }
  3. if (isset($template) && (($tpl->parent->_isTplObj() && $tpl->parent->source->type !== 'extends')
  4. || $tpl->smarty->extends_recursion)
  5. ) {
  6. $tpl->_subTemplateRender(
  7. $template,
  8. $tpl->cache_id,
  9. $tpl->compile_id,
  10. $tpl->caching ? 9999 : 0,
  11. $tpl->cache_lifetime,
  1. <?php
  2. $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_1364605119693a89a801d928_41854132', "javascript-initialization");
  3. ?>
  4. <?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, "layout.tpl");
  5. }
  6. /* {block "body-class"} */
  7. class Block_2034845347693a89a8010182_87322535 extends Smarty_Internal_Block
  8. {
  9. public $subBlocks = array (
  1. if ($_template->startRenderCallbacks) {
  2. foreach ($_template->startRenderCallbacks as $callback) {
  3. call_user_func($callback, $_template);
  4. }
  5. }
  6. $unifunc($_template);
  7. foreach ($_template->endRenderCallbacks as $callback) {
  8. call_user_func($callback, $_template);
  9. }
  10. $_template->isRenderingCache = false;
  11. } catch (Exception $e) {
  1. array_merge($_template->cached->file_dependency, $this->file_dependency);
  2. }
  3. if ($_template->source->handler->uncompiled) {
  4. $_template->source->handler->renderUncompiled($_template->source, $_template);
  5. } else {
  6. $this->getRenderedTemplateCode($_template);
  7. }
  8. if ($_template->caching && $this->has_nocache_code) {
  9. $_template->cached->hashes[ $this->nocache_hash ] = true;
  10. }
  11. if ($_template->smarty->debugging) {
  1. $this->cached->render($this, $no_output_filter);
  2. } else {
  3. if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) {
  4. $this->loadCompiled(true);
  5. }
  6. $this->compiled->render($this);
  7. }
  8. // display or fetch
  9. if ($display) {
  10. if ($this->caching && $this->smarty->cache_modified_check) {
  11. $this->smarty->ext->_cacheModify->cacheModifiedCheck(
  1. ob_start();
  2. $template->_mergeVars();
  3. if (!empty(Smarty::$global_tpl_vars)) {
  4. $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars);
  5. }
  6. $result = $template->render(false, $function);
  7. $template->_cleanUp();
  8. if ($saveVars) {
  9. $template->tpl_vars = $savedTplVars;
  10. $template->config_vars = $savedConfigVars;
  11. } else {
  1. * @throws SmartyException
  2. * @return string rendered template output
  3. */
  4. public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null)
  5. {
  6. $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0);
  7. return $result === null ? ob_get_clean() : $result;
  8. }
  9. /**
  10. * displays a Smarty template
Smarty_Internal_TemplateBase->fetch('file:404.html') in local/modules/TheliaSmarty/Template/SmartyParser.php (line 512)
  1. if (ConfigQuery::read('smarty_mute_undefined_or_null', 0)) {
  2. $this->muteUndefinedOrNullWarnings();
  3. }
  4. $output = $this->fetch($resourceType.':'.$resourceContent);
  5. if (!$compressOutput) {
  6. $this->registerFilter('output', [$this, 'trimWhitespaces']);
  7. }
SmartyParser->internalRenderer('file', '404.html', array('locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => 1, 'current_url' => 'https://pprd-anselmi.openstudio-lab.com/serviette-40x40-3c-1-8-saumon-p%C3%AAche-00n00--1.html', 'app' => object(stdClass)), true) in local/modules/TheliaSmarty/Template/SmartyParser.php (line 540)
  1. {
  2. if (false === $this->templateExists($realTemplateName) || false === $this->checkTemplate($realTemplateName)) {
  3. throw new ResourceNotFoundException(Translator::getInstance()->trans('Template file %file cannot be found.', ['%file' => $realTemplateName]));
  4. }
  5. return $this->internalRenderer('file', $realTemplateName, $parameters, $compressOutput);
  6. }
  7. private function checkTemplate($fileName)
  8. {
  9. $templates = $this->getTemplateDir();
  1. // Define the template thant shoud be used
  2. $this->parser->setTemplateDefinition(
  3. $this->parser->getTemplateHelper()->getActiveFrontTemplate()
  4. );
  5. $response = new Response($this->parser->render(ConfigQuery::getPageNotFoundView()), 404);
  6. $event->setResponse($response);
  7. }
  8. protected function displayException(ExceptionEvent $event): void
  1. return;
  2. }
  3. $exception = $event->getThrowable();
  4. if ($exception instanceof NotFoundHttpException) {
  5. $this->display404($event);
  6. }
  7. if ($exception instanceof AdminAccessDenied) {
  8. $this->displayAdminGeneralError($event);
  9. }
  1. $this->priority ??= $dispatcher->getListenerPriority($eventName, $this->listener);
  2. $e = $this->stopwatch->start($this->name, 'event_listener');
  3. try {
  4. ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
  5. } finally {
  6. if ($e->isStarted()) {
  7. $e->stop();
  8. }
  9. }
  1. foreach ($listeners as $listener) {
  2. if ($stoppable && $event->isPropagationStopped()) {
  3. break;
  4. }
  5. $listener($event, $eventName, $this);
  6. }
  7. }
  8. /**
  9. * Sorts the internal list of listeners for the given event by priority.
  1. } else {
  2. $listeners = $this->getListeners($eventName);
  3. }
  4. if ($listeners) {
  5. $this->callListeners($listeners, $eventName, $event);
  6. }
  7. return $event;
  8. }
  1. try {
  2. $this->beforeDispatch($eventName, $event);
  3. try {
  4. $e = $this->stopwatch->start($eventName, 'section');
  5. try {
  6. $this->dispatcher->dispatch($event, $eventName);
  7. } finally {
  8. if ($e->isStarted()) {
  9. $e->stop();
  10. }
  11. }
  1. * Handles a throwable by trying to convert it to a Response.
  2. */
  3. private function handleThrowable(\Throwable $e, Request $request, int $type): Response
  4. {
  5. $event = new ExceptionEvent($this, $request, $type, $e);
  6. $this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
  7. // a listener might have replaced the exception
  8. $e = $event->getThrowable();
  9. if (!$event->hasResponse()) {
in vendor/symfony/http-kernel/HttpKernel.php -> handleThrowable (line 91)
  1. $this->finishRequest($request, $type);
  2. throw $e;
  3. }
  4. return $response = $this->handleThrowable($e, $request, $type);
  5. } finally {
  6. $this->requestStack->pop();
  7. if ($response instanceof StreamedResponse && $callback = $response->getCallback()) {
  8. $requestStack = $this->requestStack;
  1. */
  2. public function handle(Request $request, $type = HttpKernelInterface::MAIN_REQUEST, $catch = true): \Symfony\Component\HttpFoundation\Response
  3. {
  4. $this->container->get('request.context')->fromRequest($request);
  5. $response = parent::handle($request, $type, $catch);
  6. return $response;
  7. }
  8. }
  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. }
  1. }
  2. }
  3. $this->boot();
  4. return parent::handle($request, $type, $catch);
  5. }
  6. /**
  7. * Load some configuration
  8. * Initialize all plugins.
Thelia->handle(object(Request)) in web/index.php (line 33)
  1. Debug::enable();
  2. }
  3. $thelia = new App\Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request = Request::createFromGlobals();
  5. $response = $thelia->handle($request);
  6. $response->send();
  7. $thelia->terminate($request, $response);

Logs

No log messages

Stack Trace

Error
Error:
Call to a member function setLocale() on null

  at local/modules/GoogleTagManager/Service/GoogleTagService.php:526
  at GoogleTagManager\Service\GoogleTagService->getPageName('product')
     (local/modules/GoogleTagManager/Service/GoogleTagService.php:70)
  at GoogleTagManager\Service\GoogleTagService->getTheliaPageViewParameters()
     (local/modules/GoogleTagManager/Hook/FrontHook.php:64)
  at GoogleTagManager\Hook\FrontHook->onMainHeadTop(object(HookRenderEvent), 'hook.1.main.head-top', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:116)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(HookRenderEvent), 'hook.1.main.head-top', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener)), 'hook.1.main.head-top', object(HookRenderEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(HookRenderEvent), 'hook.1.main.head-top')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:139)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(HookRenderEvent), 'hook.1.main.head-top')
     (local/modules/TheliaSmarty/Template/Plugins/Hook.php:111)
  at TheliaSmarty\Template\Plugins\Hook->processHookFunction(array('name' => 'main.head-top'), object(Smarty_Internal_Template))
     (local/modules/TheliaSmarty/Template/AbstractSmartyPlugin.php:116)
  at TheliaSmarty\Template\AbstractSmartyPlugin->__call('processHookFunction', array(array('name' => 'main.head-top'), object(Smarty_Internal_Template)))
     (var/cache/dev/smarty/compile/e1f7e4c649d2c5b08101af8de556427e612509b2_0.file.layout.tpl.php:172)
  at content_693a89a8079055_15033296(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
  at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
  at Smarty_Template_Compiled->render(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:217)
  at Smarty_Internal_Template->render()
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:386)
  at Smarty_Internal_Template->_subTemplateRender('layout.tpl', null, null, 0, 3600, array(), 2, false, null, null)
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:115)
  at Smarty_Internal_Runtime_Inheritance->endChild(object(Smarty_Internal_Template), 'layout.tpl')
     (var/cache/dev/smarty/compile/65921a06b1e5d0ffb804d544de2ecc52a9b16662_0.file.404.html.php:58)
  at content_693a89a801e502_70737274(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
  at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
  at Smarty_Template_Compiled->render(object(Smarty_Internal_Template))
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:217)
  at Smarty_Internal_Template->render(false, 0)
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:238)
  at Smarty_Internal_TemplateBase->_execute(object(Smarty_Internal_Template), null, null, null, 0)
     (vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116)
  at Smarty_Internal_TemplateBase->fetch('file:404.html')
     (local/modules/TheliaSmarty/Template/SmartyParser.php:512)
  at TheliaSmarty\Template\SmartyParser->internalRenderer('file', '404.html', array('locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => 1, 'current_url' => 'https://pprd-anselmi.openstudio-lab.com/serviette-40x40-3c-1-8-saumon-p%C3%AAche-00n00--1.html', 'app' => object(stdClass)), true)
     (local/modules/TheliaSmarty/Template/SmartyParser.php:540)
  at TheliaSmarty\Template\SmartyParser->render('404.html')
     (vendor/thelia/core/lib/Thelia/Action/HttpException.php:90)
  at Thelia\Action\HttpException->display404(object(ExceptionEvent))
     (vendor/thelia/core/lib/Thelia/Action/HttpException.php:49)
  at Thelia\Action\HttpException->checkHttpException(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:116)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:139)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (vendor/symfony/http-kernel/HttpKernel.php:239)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(NotFoundHttpException), object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:91)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/thelia/core/lib/Thelia/Core/TheliaHttpKernel.php:72)
  at Thelia\Core\TheliaHttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:197)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true)
     (vendor/thelia/core/lib/Thelia/Core/Thelia.php:455)
  at Thelia\Core\Thelia->handle(object(Request))
     (web/index.php:33)