LEFT JOIN location AS l on i.id = l.advertisement_id
WHERE i.status = ? AND i.language = ? AND i.hidden = ? AND i.publish_on <= ? AND m.url = ?
LIMIT 1',
['active', LANGUAGE, false, WebModel::getUTCDate('Y-m-d H:i'), $url]
);
if ($advertisementPost['profile_id'])
$advertisementPost['profile'] = Profiles::getSettings($advertisementPost['profile_id']);
else {
$advertisementPost['profile'] = [];
}
$advertisementPost['open_hours'] = json_decode($advertisementPost['open_hours']);
if ($this->url->getParameter(1) === null) {
throw new NotFoundHttpException();
}
if ($this->url->getParameter('revision', 'int') === null) {
return $this->completeAdvertisementPost(WebAdvertisementModel::get($this->url->getParameter(1)));
}
return $this->completeAdvertisementPost(
WebAdvertisementModel::getRevision(
$this->url->getParameter(1),
return $moduleSettings;
}
private function getData(): void
{
$this->blogPost = $this->getAdvertisementPost();
$this->comments = $this->getAdvertisementPostComments();
$this->settings = $this->getModuleSettings();
$this->media = WebAdvertisementModel::getAdvertisementMedia($this->blogPost['id']);
$this->logo = WebAdvertisementModel::getAdvertisementMedia($this->blogPost['id'], 'logo');
$this->sales = WebAdvertisementModel::getAdvertisementMedia($this->blogPost['id'], 'sales');
if (!is_callable([$this->object, 'execute'])) {
throw new WebException('The action file should contain a callable method "execute".');
}
$this->object->execute();
$this->setOverwrite($this->object->getOverwrite());
if ($this->object->getTemplatePath() !== null) {
$this->setTemplatePath($this->object->getTemplatePath());
}
{
$positions = [];
$mainVariables = $this->template->getAssignedVariables();
foreach ($this->record['positions'] as $position => $blocks) {
foreach ($blocks as $i => $block) {
$positions[$position][$i] = $this->parseBlock($block, $mainVariables);
}
$this->template->assign('position' . \SpoonFilter::ucfirst($position), $positions[$position]);
}
$category = '';
if (!empty($this->url->getParameter(1)))
'cookieBarHide',
!$this->get('icebird.settings')->get('Core', 'show_cookie_bar', false)
|| $this->getContainer()->get('icebird.cookie')->hasHiddenCookieBar()
);
$this->parsePositions();
$unusedPositions = array_diff(
$this->record['template_data']['names'],
array_keys($this->record['positions'])
);
foreach ($unusedPositions as $position) {
$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();
defined('APPLICATION') || define('APPLICATION', 'Web');
$applicationClass = $this->initializeWeb('Web');
$application = new $applicationClass($this->container->get('kernel'));
return $this->handleApplication($application);
}
public function webAjaxController(): Response
{
defined('APPLICATION') || define('APPLICATION', 'Web');
$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', (string) 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: profile_id at src/Web/Modules/Advertisement/Model/Advertisement.php:45 at Web\Modules\Advertisement\Model\Advertisement::get('tandir-eethuis') (src/Web/Modules/Advertisement/Controller/Detail.php:58) at Web\Modules\Advertisement\Controller\Detail->getAdvertisementPost() (src/Web/Modules/Advertisement/Controller/Detail.php:112) at Web\Modules\Advertisement\Controller\Detail->getData() (src/Web/Modules/Advertisement/Controller/Detail.php:35) at Web\Modules\Advertisement\Controller\Detail->execute() (src/Web/Core/Engine/Block/ExtraInterface.php:57) at Web\Core\Engine\Block\ExtraInterface->execute() (src/Web/Core/Engine/Page.php:345) at Web\Core\Engine\Page->parseBlock(array('extra' => object(ExtraInterface)), array()) (src/Web/Core/Engine/Page.php:270) at Web\Core\Engine\Page->parsePositions() (src/Web/Core/Engine/Page.php:145) at Web\Core\Engine\Page->display() (src/Web/Core/Engine/Web.php:15) at Web\Core\Engine\Web->display() (app/IcebirdController.php:74) at IcebirdCMS\App\IcebirdController->handleApplication(object(Web)) (app/IcebirdController.php:56) at IcebirdCMS\App\IcebirdController->webController() (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:35) at IcebirdCMS\App\Kernel->handle(object(Request)) (index.php:58) |