Jump to content

ContextErrorException in "layouts/layout-left-column.tpl"


R.Shredder

Recommended Posts

Hello there.

I'm facing several errors in debug mode that might explain why my "add to cart" button doesn't work. Hopefully... Anyways fixing this can't hurt. I'm working under PS 1.7.4.4 and PHP 7.1.

Errors i get :

 

 (1/1) ContextErrorException

Notice: Undefined index: id_category
in 9984ab50a088bf9f57339172de9a00e764435787_2.file.layout-both-columns.tpl.php line 47
at content_5d78ec1f050b53_13036661(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in 28acf031bd81b60c0dc12f94cc2ac8f42b828c36_2.file.layout-left-column.tpl.php line 38
at content_5d78ec1f01f565_27496672(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render()in smarty_internal_template.php line 385
at Smarty_Internal_Template->_subTemplateRender('layouts/layout-left-column.tpl', null, 'layouts/layout-left-column.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125
at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-left-column.tpl')in 10be2eed90c43738339fa972dc34ee582e2a0d4f_2.file.product.tpl.php line 52
at content_5d78ec1ef3edd3_63583942(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123
at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232
at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'layouts/layout-left-column.tpl', null, 0)in smarty_internal_templatebase.php line 116
at Smarty_Internal_TemplateBase->fetch('catalog/product.tpl', null, 'layouts/layout-left-column.tpl', null, false, true, false)in SmartyDev.php line 41
at SmartyDev->fetch('catalog/product.tpl', null, 'layouts/layout-left-column.tpl')in FrontController.php line 679
at FrontControllerCore->smartyOutputContent('catalog/product.tpl')in FrontController.php line 663
at FrontControllerCore->display()in Controller.php line 275
at ControllerCore->run()in Dispatcher.php line 428
at DispatcherCore->dispatch()in index.php line 28

When i open that layout-both-columns.tpl.php, here's what i get from line 45 to line 47 :

 

<body id="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['page']->value['page_name'], ENT_QUOTES, 'UTF-8');?>
" class="<?php echo htmlspecialchars(call_user_func_array($_smarty_tpl->registered_plugins[ 'modifier' ][ 'classnames' ][ 0 ], array( $_smarty_tpl->tpl_vars['page']->value['body_classes'] )), ENT_QUOTES, 'UTF-8');?>

<?php if ($_smarty_tpl->tpl_vars['page']->value['page_name'] != 'index') {?>sub-page<?php }?>"<?php if ($_GET['id_category']) {?> class="cat<?php echo htmlspecialchars($_GET['id_category'], ENT_QUOTES, 'UTF-8');?>
"<?php }?>>

I thought that might come from my language selector module, but disabling it didn't fix it.

If a kind soul could give me a hand that would be great...

Many thanks!

 

Edited by R.Shredder (see edit history)
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...