} elseif (is_array($category) && isset($category['id_category'])) {
$params['id'] = $category['id_category'];
} elseif (is_int($category) || (is_string($category) && ctype_digit($category))) {
$params['id'] = (int) $category;
} else {
throw new \InvalidArgumentException('Invalid category parameter');
}
if ((int) $params['id'] === 0) {
Tools::displayAsDeprecated('Generating URL with id 0 is deprecated');
}
return $this->addPageMetaDescription(str_replace("%synonymous%", $synonymous, str_replace("%category%", $category->name, $pattern)));
}
public function getCanonicalURL()
{
$canonicalUrl = $this->context->link->getCategoryLink($this->category);
$parsedUrl = parse_url($canonicalUrl);
if (isset($parsedUrl['query'])) {
parse_str($parsedUrl['query'], $params);
} else {
$params = [];
return $this->category;
}
public function getTemplateVarPage()
{
$page = parent::getTemplateVarPage();
if ($this->notFound) {
$page['page_name'] = 'pagenotfound';
$page['body_classes']['pagenotfound'] = true;
$page['title'] = $this->trans('The page you are looking for was not found.', [], 'Shop.Theme.Global');
$templateVars = [
'pscheckoutEnabled' => $this->getPsCheckoutEnable(),
'currency' => $this->getTemplateVarCurrency(),
'customer' => $this->getTemplateVarCustomer(),
'language' => $this->objectPresenter->present($this->context->language),
'page' => $this->getTemplateVarPage(),
'shop' => $this->getTemplateVarShop(),
'shop_id'=> $this->context->shop->id,
'urls' => $this->getTemplateVarUrls(),
'configuration' => $this->getTemplateVarConfiguration(),
'field_required' => $this->context->customer->validateFieldsRequiredDatabase(),
if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
$this->initHeader();
}
if ($this->viewAccess()) {
$this->initContent();
} else {
$this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
}
if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
Level | Channel | Message |
---|---|---|
INFO 08:50:24 | php |
User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead. { "exception": {} } |
INFO 08:50:24 | php |
User Deprecated: Since api-platform/core 2.7: The service "ApiPlatform\Core\Bridge\Symfony\Routing\IriConverter" is deprecated, use ApiPlatform\Symfony\Routing\IriConverter instead. { "exception": {} } |
INFO 08:50:25 | php |
User Deprecated: The "$name" argument in method "Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector::__construct()" is deprecated since Symfony 4.2. { "exception": {} } |
INFO 08:50:25 | php |
User Deprecated: The "$version" argument in method "Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector::__construct()" is deprecated since Symfony 4.2. { "exception": {} } |
INFO 08:50:25 | php |
User Deprecated: __construct is deprecated since version 8.1 and will be removed in the next major version. { "exception": {} } |
INFO 08:50:25 | php |
User Deprecated: The "Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent::getException()" method is deprecated since Symfony 4.4, use "getThrowable()" instead. { "exception": {} } |
CRITICAL 08:50:25 | request |
Uncaught PHP Exception InvalidArgumentException: "Invalid category parameter" at /var/www/perfumeriajulia.es/classes/Link.php line 448 { "exception": {} } |
CRITICAL 08:50:25 | php |
Uncaught Exception: Invalid category parameter { "exception": {} } |
InvalidArgumentException |
---|
InvalidArgumentException: Invalid category parameter at classes/Link.php:448 at LinkCore->getCategoryLink() (override/controllers/front/listing/CategoryController.php:118) at CategoryController->getCanonicalURL() (classes/controller/FrontController.php:1762) at FrontControllerCore->getTemplateVarPage() (override/classes/controller/FrontController.php:707) at FrontController->getTemplateVarPage() (controllers/front/listing/CategoryController.php:271) at CategoryControllerCore->getTemplateVarPage() (override/controllers/front/listing/CategoryController.php:58) at CategoryController->getTemplateVarPage() (override/classes/controller/FrontController.php:463) at FrontController->assignGeneralPurposeVariables() (classes/controller/FrontController.php:569) at FrontControllerCore->initContent() (controllers/front/listing/CategoryController.php:128) at CategoryControllerCore->initContent() (classes/controller/Controller.php:319) at ControllerCore->run() (classes/Dispatcher.php:510) at DispatcherCore->dispatch() (index.php/:58) |