Valette Posted September 21, 2023 Share Posted September 21, 2023 Bonjour, j'ai un message d'erreur qui s'affiche au dessus du formulaire de contact côté front : /home/vace0108/lbr-conception.com/var/cache/dev/smarty/compile/leo_autofiix/47/ab/e8/47abe8e4541329f8355937ab0c05b1405a91fcd9_2.file.contactform.tpl.php on line 25 Warning: Attempt to read property "value" on null in /home/vace0108/lbr-conception.com/var/cache/dev/smarty/compile/leo_autofiix/47/ab/e8/47abe8e4541329f8355937ab0c05b1405a91fcd9_2.file.contactform.tpl.php on line 25 Warning: Trying to access array offset on value of type null in /home/vace0108/lbr-conception.com/var/cache/dev/smarty/compile/leo_autofiix/47/ab/e8/47abe8e4541329f8355937ab0c05b1405a91fcd9_2.file.contactform.tpl.php on line 25 Warning: Trying to access array offset on value of type null in /home/vace0108/lbr-conception.com/var/cache/dev/smarty/compile/leo_autofiix/47/ab/e8/47abe8e4541329f8355937ab0c05b1405a91fcd9_2.file.contactform.tpl.php on line 25 " method="post" enctype="multipart/form-data"> Pouvez-vous m'aider à résoudre ce problème ? Merci par avance. Link to comment Share on other sites More sharing options...
solsol69 Posted September 21, 2023 Share Posted September 21, 2023 Bonjour peut être en vidant votre cache Link to comment Share on other sites More sharing options...
Valette Posted September 22, 2023 Author Share Posted September 22, 2023 20 hours ago, solsol69 said: Bonjour peut être en vidant votre cache Pas de changement en vidant le cache. Voici le code (à partir de la ligne 25) qui est sur mon fichier .php : <form action="<?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['urls']->value['pages']['contact'], ENT_QUOTES, 'UTF-8');?> " method="post" <?php if ($_smarty_tpl->tpl_vars['contact']->value['allow_file_upload']) {?>enctype="multipart/form-data"<?php }?>> <?php if ($_smarty_tpl->tpl_vars['notifications']->value) {?> <div class="col-xs-12 alert <?php if ($_smarty_tpl->tpl_vars['notifications']->value['nw_error']) {?>alert-danger<?php } else { ?>alert-success<?php }?>"> <ul> <?php $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['notifications']->value['messages'], 'notif'); $_smarty_tpl->tpl_vars['notif']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['notif']->value) { $_smarty_tpl->tpl_vars['notif']->do_else = false; ?> <li><?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['notif']->value, ENT_QUOTES, 'UTF-8');?> </li> <?php } $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?> </ul> </div> <?php }?> <?php if (!$_smarty_tpl->tpl_vars['notifications']->value || $_smarty_tpl->tpl_vars['notifications']->value['nw_error']) {?> <section class="form-fields"> <div class="form-group row"> <div class="col-md-9 col-md-offset-3"> <h3><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Contact us','d'=>'Shop.Theme.Global'),$_smarty_tpl ) );?> </h3> </div> </div> <div class="form-group row"> <label class="col-md-3 form-control-label" for="id_contact"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Subject','d'=>'Shop.Forms.Labels'),$_smarty_tpl ) );?> </label> <div class="col-md-6"> <select name="id_contact" id="id_contact" class="form-control form-control-select"> <?php $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['contact']->value['contacts'], 'contact_elt'); $_smarty_tpl->tpl_vars['contact_elt']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['contact_elt']->value) { $_smarty_tpl->tpl_vars['contact_elt']->do_else = false; ?> <option value="<?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['contact_elt']->value['id_contact'], ENT_QUOTES, 'UTF-8');?> "><?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['contact_elt']->value['name'], ENT_QUOTES, 'UTF-8');?> </option> <?php } $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?> </select> </div> </div> <div class="form-group row"> <label class="col-md-3 form-control-label" for="email"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Email address','d'=>'Shop.Forms.Labels'),$_smarty_tpl ) );?> </label> <div class="col-md-6"> <input id="email" class="form-control" name="from" type="email" value="<?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['contact']->value['email'], ENT_QUOTES, 'UTF-8');?> " placeholder="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'[email protected]','d'=>'Shop.Forms.Help'),$_smarty_tpl ) );?> " > </div> </div> <?php if ($_smarty_tpl->tpl_vars['contact']->value['orders']) {?> <div class="form-group row"> <label class="col-md-3 form-control-label" for="id-order"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Order reference','d'=>'Shop.Forms.Labels'),$_smarty_tpl ) );?> </label> <div class="col-md-6"> <select id="id-order" name="id_order" class="form-control form-control-select"> <option value=""><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Select reference','d'=>'Shop.Forms.Help'),$_smarty_tpl ) );?> </option> <?php $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['contact']->value['orders'], 'order'); $_smarty_tpl->tpl_vars['order']->do_else = true; if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['order']->value) { $_smarty_tpl->tpl_vars['order']->do_else = false; ?> <option value="<?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['order']->value['id_order'], ENT_QUOTES, 'UTF-8');?> "><?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['order']->value['reference'], ENT_QUOTES, 'UTF-8');?> </option> <?php } $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?> </select> </div> <span class="col-md-3 form-control-comment"> <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'optional','d'=>'Shop.Forms.Help'),$_smarty_tpl ) );?> </span> </div> <?php }?> <?php if ($_smarty_tpl->tpl_vars['contact']->value['allow_file_upload']) {?> <div class="form-group row"> <label class="col-md-3 form-control-label" for="file-upload"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Attachment','d'=>'Shop.Forms.Labels'),$_smarty_tpl ) );?> </label> <div class="col-md-6"> <input id="file-upload" type="file" name="fileUpload" class="filestyle" data-buttonText="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Choose file','d'=>'Shop.Theme.Actions'),$_smarty_tpl ) );?> "> </div> <span class="col-md-3 form-control-comment"> <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'optional','d'=>'Shop.Forms.Help'),$_smarty_tpl ) );?> </span> </div> <?php }?> <div class="form-group row"> <label class="col-md-3 form-control-label" for="contactform-message"><?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Message','d'=>'Shop.Forms.Labels'),$_smarty_tpl ) );?> </label> <div class="col-md-9"> <textarea id="contactform-message" class="form-control" name="message" placeholder="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'How can we help?','d'=>'Shop.Forms.Help'),$_smarty_tpl ) );?> " rows="3" ><?php if ($_smarty_tpl->tpl_vars['contact']->value['message']) { echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['contact']->value['message'], ENT_QUOTES, 'UTF-8'); }?></textarea> </div> </div> <?php if ((isset($_smarty_tpl->tpl_vars['id_module']->value))) {?> <div class="form-group row"> <div class="offset-md-3"> <?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0], array( array('h'=>'displayGDPRConsent','id_module'=>$_smarty_tpl->tpl_vars['id_module']->value),$_smarty_tpl ) );?> </div> </div> <?php }?> </section> <footer class="form-footer text-sm-right"> <style> input[name=url] { display: none !important; } </style> <input type="text" name="url" value=""/> <input type="hidden" name="token" value="<?php echo htmlspecialchars((string) $_smarty_tpl->tpl_vars['token']->value, ENT_QUOTES, 'UTF-8');?> " /> <input class="btn btn-primary" type="submit" name="submitMessage" value="<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['l'][0], array( array('s'=>'Send','d'=>'Shop.Theme.Actions'),$_smarty_tpl ) );?> "> </footer> <?php }?> </form> Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now