Jump to content

Undefined index: category; when clicking on a tag


Recommended Posts

Hi. I'm running Prestashop v1.7.2.2. I have installed the 'Block Tags' module, which seems to be working fine. It displays correct tags on the left side of products page. However, when I click on one of the tags, I get this error:

 

ContextErrorException in smarty_internal_templatebase.php(157) : eval()'d code line 626: Notice: Undefined index: category

  1. in C:\wamp\www\inkstills\vendor\prestashop\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code line 626
  2. at ErrorHandler->handleError('8', 'Undefined index: category', 'C:\wamp\www\inkstills\vendor\prestashop\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()'d code', '626', array('_smarty_tpl' => object(Smarty_Dev_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 626
  3. at content_5af2a70f773896_59927145(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php(157) : eval()'d code line 222
  4. at content_5af2a70fa59ba1_45974683(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188
  5. at Smarty_Internal_TemplateBase->fetch('catalog/listing/search.tpl', null, 'layouts/layout-full-width.tpl', object(SmartyDev), false, true, false) in SmartyDev.php line 41
  6. at SmartyDev->fetch('catalog/listing/search.tpl', null, 'layouts/layout-full-width.tpl') in FrontController.php line 660
  7. at FrontControllerCore->smartyOutputContent('catalog/listing/search.tpl') in FrontController.php line 644
  8. at FrontControllerCore->display() in Controller.php line 225
  9. at ControllerCore->run() in Dispatcher.php line 379
  10. at DispatcherCore->dispatch() in index.php line 28

 

Please help me understand what's going on. Thanks

Edited by boneless (see edit history)
Link to comment
Share on other sites

16 hours ago, NemoPS said:

See if you can get rid of the category mention in catalog/listing/search.tpl

 

The search.tpl contains only one line of code:

{extends file='catalog/listing/product-list.tpl'}

product-list.tpl has no mention of a variable named 'category'. At the start it has a "{extends file=$layout}" and I don't understand where that $layout comes from. Maybe it has something to do with it?

Link to comment
Share on other sites

Here goes 1.7...

The template hierarchy is a little chaotic. It should be extending category.tpl at some point, I believe. Probably. I honestly don't remember off the top of my head, I gave up on 1.7 :) 

Link to comment
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...