Jump to content

[ Résolu ] Problème de base de données? ContextErrorException


Recommended Posts

Bonjour,

Depuis quelques jours, sans avoir fait de modification, ni mise à jour ( pour une fois :D ) j'ai ce message d'erreur à l'affichage d'une fiche produit. Tout le reste semble fonctionner.

Ce que j'ai testé : 

- Une restauration de sauvegarde FTP côté ovh ,

- idem sur ovh pour la base de données

 

J'ai regardé un peu sur les autres topic, qui conseillent de revoir le chmood , de retirer le module posant problème , mais sincèrement je ne vois pas quoi faire.

est-ce que cela peut venir des récentes modifications faites par ovh sur les bases de données

Merci à vous d'avance pour votre aide :)

---------------------------------------------------------------------------------------------------------------------

Edit: Version prestashop

PrestaShop 1.7.5.2

Un thème acheté sur prestaaddons.

kidshop version 1.0.2

Conçu par ETS-Soft

---------------------------------------------------------------------------

copie du message d'erreur :

Quote

Whoops, looks like something went wrong. (1/1) ContextErrorException

Notice: Undefined index: base_dir

in 757745e586cdb42cb60603b2d6fc7bac39c17bbd_2.file.product.tpl.php line 37
at content_5d00d7d29a89e0_92844083(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(null, null, null, null, 0)in smarty_internal_templatebase.php line 116
at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false)in SmartyDevTemplate.php line 40
at SmartyDevTemplateCore->fetch()in Module.php line 2375
at ModuleCore->display('/home/lapetiteda/www/frip/modules/mailalerts/mailalerts.php', 'product.tpl')in mailalerts.php line 485
at MailAlerts->hookActionProductOutOfStock(array('product' => object(ProductLazyArray), 'smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 966
at HookCore::coreCallHook(object(MailAlerts), 'hookactionProductOutOfStock', array('product' => object(ProductLazyArray), 'smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 351
at HookCore::callHookOn(object(MailAlerts), 'actionProductOutOfStock', array('product' => object(ProductLazyArray), 'smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 903
at HookCore::exec('actionProductOutOfStock', array('product' => object(ProductLazyArray), 'smarty' => object(SmartyDevTemplate)), null)in smarty.config.inc.php line 165
at smartyHook(array('h' => 'actionProductOutOfStock', 'product' => object(ProductLazyArray)), object(SmartyDevTemplate))
at call_user_func_array('smartyHook', array(array('h' => 'actionProductOutOfStock', 'product' => object(ProductLazyArray)), object(SmartyDevTemplate)))in SmartyLazyRegister.php line 83
at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'actionProductOutOfStock', 'product' => object(ProductLazyArray)), object(SmartyDevTemplate)))
at SmartyLazyRegister->smartyHook(array('h' => 'actionProductOutOfStock', 'product' => object(ProductLazyArray)), object(SmartyDevTemplate))
at call_user_func_array(array(object(SmartyLazyRegister), 'smartyHook'), array(array('h' => 'actionProductOutOfStock', 'product' => object(ProductLazyArray)), object(SmartyDevTemplate)))in bb0ab03e53b80485ec12e1a9d03e3a533a4b56bd_2.file.product-details.tpl.php line 177
at Block_9866749475d00d7d29270a6_69391976->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248
at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_9866749475d00d7d29270a6_69391976), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184
at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_9866749475d00d7d29270a6_69391976))in smarty_internal_runtime_inheritance.php line 156
at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_9866749475d00d7d29270a6_69391976', 'product_out_of_stock')in bb0ab03e53b80485ec12e1a9d03e3a533a4b56bd_2.file.product-details.tpl.php line 45
at content_5d00d7d293f120_22263682(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

 

bug-presta.png

Edited by kiri84
résolu (see edit history)
Link to comment
Share on other sites

Bonjour, tofrou

oui bien sur, l'imprim écran pour les lignes ;)

 

193782482_Sanstitre3.thumb.png.ad57ce77ef6dc7360c46ebc03b82e6c7.png

le code :

// <![CDATA[
oosHookJsCodeFunctions.push('oosHookJsCodeMailAlert');

function clearText() {
	if ($('#oos_customer_email').val() == '[email protected]')
		$('#oos_customer_email').val('');
}

function oosHookJsCodeMailAlert() {
	$.ajax({
		type: 'POST',
		url: '<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_dir']->value, ENT_QUOTES, 'UTF-8');?>
modules/mailalerts/mailalerts-ajax_check.php',
		data: 'id_product=<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id_product']->value, ENT_QUOTES, 'UTF-8');?>
&id_product_attribute='+$('#idCombination').val(),
		success: function (msg) {
			if (msg == '0') {
				$('#mailalert_link').show();
				$('#oos_customer_email').show();
			}
			else {
				$('#mailalert_link').hide();
				$('#oos_customer_email').hide();
			}
		}
	});
}

function  addNotification() {
	$.ajax({
		type: 'POST',

 

Link to comment
Share on other sites

  • 5 months later...

Hello !

Même problème pour moi.
Erreur "oosHookJsCodeFunctions is not defined" , et quand je désactive le module Mail Alerts l'erreur disparait.

Mais du coup comment on fait poru garder le module Mail Alerts mais sans le bug? :)

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
On 12/5/2019 at 3:23 PM, PP2607 said:

Hello !

Même problème pour moi.
Erreur "oosHookJsCodeFunctions is not defined" , et quand je désactive le module Mail Alerts l'erreur disparait.

Mais du coup comment on fait poru garder le module Mail Alerts mais sans le bug? :)

Bonjour,

Exactement le même souci avec PS 1.7.7.2 et module ps_emailalerts 2.2.1.
Comment continuer à être alerté des nouvelles commandes si on le désactive ? 😅

C'est une histoire de dingue.

Merci pour vos conseils bienvenus.

Bonne journée.
merguez

Link to comment
Share on other sites

9 minutes ago, merguez said:

Bonjour,

Exactement le même souci avec PS 1.7.7.2 et module ps_emailalerts 2.2.1.
Comment continuer à être alerté des nouvelles commandes si on le désactive ? 😅

C'est une histoire de dingue.

Merci pour vos conseils bienvenus.

Bonne journée.
merguez

@merguez Perso j'ai désinstallé puis réinstallé le module à partir du Catalogues de Modules (Modules / Catalogue de Modules).
Pour l'instant ça a l'air de fonctionner chez moi.

Courage.

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