Jump to content
dvd74

[PrestaShopException] Invalid category vars at line 384 in file classes/Link.php

Recommended Posts

How can I solve this problem on PS 1.7.5.1?

Invalid category vars at line 384 in file classes/Link.php

Quote

379. if (is_array($category) && isset($category['id_category'])) { 380. $category = new Category($category, $idLang); 381. } elseif ((int) $category) { 382. $category = new Category((int) $category, $idLang); 383. } else { 384. throw new PrestaShopException('Invalid category vars'); 385. } 386. } 387. 388. return $category; 389. }

LinkCore->getCategoryObject - [line 437 - classes/Link.php] - [2 Arguments]

Quote

432. $rule = 'layered_rule'; 433. $params['selected_filters'] = $selectedFilters; 434. } 435. 436. if (!$alias) { 437. $category = $this->getCategoryObject($category, $idLang); 438. } 439. $params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias; 440. if ($dispatcher->hasKeyword($rule, $idLang, 'meta_keywords', $idShop)) { 441. $category = $this->getCategoryObject($category, $idLang); 442. $params['meta_keywords'] = Tools::str2url($category->getFieldByLang('meta_keywords'));

Argument [0] 0 Argument [1] 1

LinkCore->getCategoryLink - [line 131 - var/cache/dev/smarty/compile/5e/b9/ed/5eb9ed4b7b8507541d694e31994d3832309f521b_2.file.item_two.tpl.php] - [1 Arguments]

Quote

126. ?> 127. 128. <div class="category-title"><a href="<?php ob_start(); 129. echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['id_category_default'], ENT_QUOTES, 'UTF-8'); 130. $_prefixVariable2 = ob_get_clean(); 131. echo htmlspecialchars($_smarty_tpl->tpl_vars['link']->value->getCategoryLink($_prefixVariable2), ENT_QUOTES, 'UTF-8');?> 132. "><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['category_name'], ENT_QUOTES, 'UTF-8');?> 133. </a></div> 134. <?php 135. } 136. }

Block_926671595d734faf09f120_58738528->callBlock - [line 248 - vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php] - [1 Arguments]

Quote

243. */ 244. public function callBlock(Smarty_Internal_Block $block, Smarty_Internal_Template $tpl) 245. { 246. $this->sourceStack[] = $tpl->source; 247. $tpl->source = $this->sources[ $block->tplIndex ]; 248. $block->callBlock($tpl); 249. $tpl->source = array_pop($this->sourceStack); 250. } 251. }

 

Edited by dvd74 (see edit history)

Share this post


Link to post
Share on other sites

i have same error. kindly assist here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More