private function getData(): void
{
$category_url = $this->url->getParameter(0);
$product_url = $this->url->getParameter(1);
$this->category = FrontendSwanModel::getCategory($category_url);
if($product_url != '') {
$this->product = FrontendSwanModel::get($product_url);
$this->product["description"] = str_replace("\n","<br>",$this->product["description"]);
}
if (!is_callable([$this->object, 'execute'])) {
throw new FrontendException('The action file should contain a callable method "execute".');
}
// call the execute method of the real action (defined in the module)
$this->object->execute();
// set some properties
$this->setOverwrite($this->object->getOverwrite());
if ($this->object->getTemplatePath() !== null) {
$this->setTemplatePath($this->object->getTemplatePath());
// loop all positions
foreach ($this->record['positions'] as $position => $blocks) {
// loop all blocks in this position
foreach ($blocks as $i => $block) {
$positions[$position][$i] = $this->parseBlock($block, $mainVariables);
}
// assign position to template
$this->template->assign('position' . \SpoonFilter::ucfirst($position), $positions[$position]);
}
'cookieBarHide',
!$this->get('fork.settings')->get('Core', 'show_cookie_bar', false)
|| $this->getContainer()->get('fork.cookie')->hasHiddenCookieBar()
);
$this->parsePositions();
// assign empty positions
$unusedPositions = array_diff(
$this->record['template_data']['names'],
array_keys($this->record['positions'])
$application->passContainerToModels();
try {
$application->initialize();
return $application->display();
} catch (RedirectException $ex) {
return $ex->getResponse();
} catch (Twig_Error $twigError) {
if ($twigError->getPrevious() instanceof RedirectException) {
return $twigError->getPrevious()->getResponse();
$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) {
No log messages
ContextErrorException |
---|
Symfony\Component\Debug\Exception\ContextErrorException: Notice: Undefined index: url at src/Frontend/Modules/Swan/Engine/Model.php:108 at Frontend\Modules\Swan\Engine\Model::getCategory('kantoor-officity-x8-70') (src/Frontend/Modules/Swan/Actions/Index.php:31) at Frontend\Modules\Swan\Actions\Index->getData() (src/Frontend/Modules/Swan/Actions/Index.php:22) at Frontend\Modules\Swan\Actions\Index->execute() (src/Frontend/Core/Engine/Block/ExtraInterface.php:126) at Frontend\Core\Engine\Block\ExtraInterface->execute() (src/Frontend/Core/Engine/Page.php:367) at Frontend\Core\Engine\Page->parseBlock(array('extra' => object(ExtraInterface)), array()) (src/Frontend/Core/Engine/Page.php:346) at Frontend\Core\Engine\Page->parsePositions() (src/Frontend/Core/Engine/Page.php:199) at Frontend\Core\Engine\Page->display() (src/Frontend/Core/Engine/Frontend.php:25) at Frontend\Core\Engine\Frontend->display() (app/ForkController.php:106) at ForkCMS\App\ForkController->handleApplication(object(Frontend)) (app/ForkController.php:80) at ForkCMS\App\ForkController->frontendController() (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) (app/Kernel.php:53) at ForkCMS\App\Kernel->handle(object(Request)) (index.php:63) |