Jump to content

500 error on products-comparison page


artuha

Recommended Posts

 

Hello!

The site on Prestashop 1.6.0.9, php 5.6.32. When I add items to the comparison list in any place (for example, here) and go to the comparison page - It gives 500 error, shows only the site header and black screen. If you do not add products to the comparison list, then there is no black screen, the page only says that you have to add products for comparison. There is an error in the browser console:

Uncaught ReferenceError: FancyboxI18nClose is not defined
    at HTMLDocument.<anonymous> (jquery-1.11.0.min.js:169)
    at j (jquery-1.11.0.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.0.min.js:2)
    at Function.ready (jquery-1.11.0.min.js:2)
    at HTMLDocument.K (jquery-1.11.0.min.js:2)

 

In the server logs:

PHP Notice:  Undefined index: search_query in /cache/smarty/compile/...blocksearch-top.tpl.php on line 37, referer: https://svdd.ru/products-comparison
PHP Notice:  Trying to get property of non-object in /cache/smarty/compile/...blocksearch-top.tpl.php on line 37, referer: https://svdd.ru/products-comparison
PHP Notice:  Undefined index: ajax_allowed in /cache/smarty/compile/...file.blockcart.tpl.php on line 86, referer: https://svdd.ru/products-comparison
PHP Notice:  Trying to get property of non-object in /cache/smarty/compile/...file.blockcart.tpl.php on line 86, referer: https://svdd.ru/products-comparison
PHP Fatal error:  Cannot use object of type Product as array in /cache/smarty/compile/...blockcart.tpl.php on line 121, referer: https://svdd.ru/products-comparison

 

In line 37 of blocksearch-top.tpl.php

<?php echo stripslashes(mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['search_query']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8'));?>

in line 86 of blockcart.tpl.php:

<?php if ($_smarty_tpl->tpl_vars['ajax_allowed']->value&&isset($_smarty_tpl->tpl_vars['blockcart_top']->value)&&!$_smarty_tpl->tpl_vars['blockcart_top']->value) {?>

in line 121 of blockcart.tpl.php:

<?php $_smarty_tpl->tpl_vars['productId'] = new Smarty_variable($_smarty_tpl->tpl_vars['product']->value['id_product'], null, 0);?>
Before that there was a mistake:
PREG_BACKTRACK_LIMIT_ERROR in function packJSinHTML

 

I changed the value of pcre.backtrack_limit to 1000000000, as a result, it did not fix the error, but the site began to be slowly, I corrected back. As a result, I commented out the display of this error in media.php. But the problem here is probably not in it. Please anyone help, I wrote on different forums - and I have not yet found a solution.

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...