Dispatcher::createUrl() miss required parameter "rewrite" for route "module-leoblog-blog"
at line 930 in file classes/Dispatcher.php
925. if (!$data['required']) {
926. continue;
927. }
928.
929. if (!array_key_exists($key, $params)) {
930. throw new PrestaShopException('Dispatcher::createUrl() miss required parameter "' . $key . '" for route "' . $route_id . '"');
931. }
932. if (isset($this->default_routes[$route_id])) {
933. $query_params[$this->default_routes[$route_id]['keywords'][$key]['param']] = $params[$key];
934. }
935. }
1171.
1172. if ($controller === 'cart' && (!empty($request['add']) || !empty($request['delete'])) && Configuration::get('PS_TOKEN_ENABLE')) {
1173. $request['token'] = Tools::getToken(false);
1174. }
1175.
1176. $uriPath = Dispatcher::getInstance()->createUrl($controller, $idLang, $request, false, '', $idShop);
1177.
1178. return $this->getBaseLink($idShop, $ssl, $relativeProtocol) . $this->getLangLink($idLang, null, $idShop) . ltrim($uriPath, '/');
1179. }
1180.
1181. /**
Argument [0] module-leoblog-blog Argument [1] 1 Argument [2] Array ( [id] => 30 ) Argument [3] Argument [4] Argument [5] 1
706. $params['module'] = $module;
707. $params['controller'] = $controller ? $controller : 'default';
708.
709. // If the module has its own route ... just use it !
710. if (Dispatcher::getInstance()->hasRoute('module-' . $module . '-' . $controller, $idLang, $idShop)) {
711. return $this->getPageLink('module-' . $module . '-' . $controller, $ssl, $idLang, $params);
712. } else {
713. return $url . Dispatcher::getInstance()->createUrl('module', $idLang, $params, $this->allow, '', $idShop);
714. }
715. }
716.
Argument [0] module-leoblog-blog Argument [1] Argument [2] 1 Argument [3] Array ( [id] => 30 )
1240. } elseif (isset($params['fc']) && $params['fc'] == 'module') {
1241. $module = Validate::isModuleName(Tools::getValue('module')) ? Tools::getValue('module') : '';
1242. if (!empty($module)) {
1243. unset($params['fc'], $params['module']);
1244.
1245. return $this->getModuleLink($module, $controller, $params, null, (int) $idLang);
1246. }
1247. }
1248.
1249. return $this->getPageLink($controller, null, $idLang, $params);
1250. }
Argument [0] leoblog Argument [1] blog Argument [2] Array ( [id] => 30 [module] => leoblog [controller] => blog ) Argument [3] Argument [4] 1
2034. // No need to display alternative lang if there is only one enabled
2035. return $alternativeLangs;
2036. }
2037.
2038. foreach ($languages as $lang) {
2039. $langUrl = $this->context->link->getLanguageLink($lang['id_lang']);
2040. $alternativeLangs[$lang['language_code']] = $this->sanitizeUrl($langUrl);
2041. }
2042.
2043. return $alternativeLangs;
2044. }
Argument [0] 1
1522. }
1523. $pages['register'] = $this->context->link->getPageLink('authentication', true, null, ['create_account' => '1']);
1524. $pages['order_login'] = $this->context->link->getPageLink('order', true, null, ['login' => '1']);
1525. $urls['pages'] = $pages;
1526.
1527. $urls['alternative_langs'] = $this->getAlternativeLangsUrl();
1528.
1529. $urls['theme_assets'] = __PS_BASE_URI__ . 'themes/' . $this->context->shop->theme->getName() . '/assets/';
1530.
1531. $urls['actions'] = [
1532. 'logout' => $this->context->link->getPageLink('index', true, null, 'mylogout'),
1647.
1648. public function getTemplateVarShop()
1649. {
1650. $address = $this->context->shop->getAddress();
1651.
1652. $urls = $this->getTemplateVarUrls();
1653. $psImageUrl = $urls['img_ps_url'] ?? _PS_IMG_;
1654.
1655. $shop = [
1656. 'id' => $this->context->shop->id,
1657. 'name' => Configuration::get('PS_SHOP_NAME'),
524. 'cart' => $this->cart_presenter->present($this->context->cart),
525. 'currency' => $this->getTemplateVarCurrency(),
526. 'customer' => $this->getTemplateVarCustomer(),
527. 'language' => $this->objectPresenter->present($this->context->language),
528. 'page' => $this->getTemplateVarPage(),
529. 'shop' => $this->getTemplateVarShop(),
530. 'urls' => $this->getTemplateVarUrls(),
531. 'configuration' => $this->getTemplateVarConfiguration(),
532. 'field_required' => $this->context->customer->validateFieldsRequiredDatabase(),
533. 'breadcrumb' => $this->getBreadcrumb(),
534. 'link' => $this->context->link,
585. /**
586. * Initializes common front page content: header, footer and side columns.
587. */
588. public function initContent()
589. {
590. $this->assignGeneralPurposeVariables();
591. $this->process();
592.
593. if (!isset($this->context->cart)) {
594. $this->context->cart = new Cart();
595. }
72. ]);
73. if ($this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS) < $minimalPurchase) {
74. Tools::redirect('index.php?controller=order&step=1');
75. }
76. }
77. parent::initContent();
78. }
79.
80. /**
81. * Non-static translation method for frontoffice modules.
82. *
132. $config = LeoBlogConfig::getInstance();
133.
134. /* Load Css and JS File */
135. LeoBlogHelper::loadMedia($this->context, $this);
136.
137. parent::initContent();
138.
139. if (Tools::isSubmit('submitcomment')) {
140. # validate module
141. $this->comment();
142. }
301. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
302. $this->initHeader();
303. }
304.
305. if ($this->viewAccess()) {
306. $this->initContent();
307. } else {
308. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
309. }
310.
311. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
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();