Category not found
at line 1182 in file classes/Tools.php
1177. ->getTranslator()
1178. ->trans('Fatal error', [], 'Admin.Notifications.Error');
1179. }
1180.
1181. if (_PS_MODE_DEV_) {
1182. throw new PrestaShopException($errorMessage);
1183. }
1184.
1185. return $errorMessage;
1186. }
1187.
102.
103. // Check if the category is active and return 404 error if is disable.
104. if (!$this->category->active || !Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop() || in_array($this->category->id, array(Configuration::get('PS_HOME_CATEGORY'), Configuration::get('PS_ROOT_CATEGORY')))) {
105. header('HTTP/1.1 404 Not Found');
106. header('Status: 404 Not Found');
107. $this->errors[] = Tools::displayError('Category not found');
108. } else {
109. // Check if category can be accessible by current customer and return 403 if not
110. if (!$this->category->checkAccess($this->context->customer->id)) {
111. header('HTTP/1.1 403 Forbidden');
112. header('Status: 403 Forbidden');
Argument [0] Category not found
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
520. if (isset($params_hook_action_dispatcher)) {
521. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
522. }
523.
524. // Running controller
525. $controller->run();
526.
527. // Execute hook dispatcher after
528. if (isset($params_hook_action_dispatcher)) {
529. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
530. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();