Jump to content

index define reference


Recommended Posts

Hi.after migratin on vps some notices start to apear cannot find solution if google or here plz help, so despaired

 

ps 1.6.1.2 debug mode cant find any error  PHP Warning:  htmlspecialchars() expects parameter 1 to be string, array given in /var/www/domains/caprigoshop.ru/cache/smarty/compile/19/a2/1d/19a21df71adc49a3995d4270d8f96aeac8c51fd8.file.carrier_tmpl.tpl.php on line 125 but its a module to a cart works fine

 

 

Here notices appear on every page of store but all works fine 

 

PHP Notice:  Undefined index: reference in /var/www/domains/caprigoshop.ru/cache/smarty/compile/fc/32/c1/fc32c192d7828cd5a166b414c36dad13ebb51838.file.product-list.tpl.php on line 200

 

line 200

					<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['reference'], ENT_QUOTES, 'UTF-8', true);?> 

PHP Notice:  Undefined index: reference in /var/www/domains/caprigoshop.ru/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 200

 

 

Please help cant find solution

 

maybe PrestaShop Opcache Manager mess up with Smarty

all files the same why notice starts idontknow

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

Notices usually (in most cases) do not alter the correct functioning of the shop. So you could just turn them off (it looks like you have debug mode on or changed the php error reporting level). Anyway, I do not understand why you use that code just to show the product reference. You can change

<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['reference'], ENT_QUOTES, 'UTF-8', true);?> 

to:

<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;">{$product.reference} 

and you should not get those notices anymore. 

 

Cheers.

Link to comment
Share on other sites

Notices usually (in most cases) do not alter the correct functioning of the shop. So you could just turn them off (it looks like you have debug mode on or changed the php error reporting level). Anyway, I do not understand why you use that code just to show the product reference. You can change

<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['product']->value['reference'], ENT_QUOTES, 'UTF-8', true);?> 
to:

<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;">{$product.reference} 
and you should not get those notices anymore. 

 

Cheers.

 

no its php cacche file in smarty/compile 

tpl file looks like that and its by default i didnt change anything

	<a class="product_reference" style="color:#cc3300;font-family:Tahoma,Geneva,sans-serif;">{$product.reference|escape:'html':'UTF-8'}

i didnt see than notices until i migrate to vps shops works fine but those on notices swarms my erroe log file

 

looks like i found php error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT mb on shared it was off

 

Here reference too strange

PHP Notice:  Undefined index: reference in /var/www/domains/caprigoshop.ru/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 200

 

Im think its Smarty going crazy but why cant say

Edited by butlerov (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...