bikinos Posted May 12, 2015 Share Posted May 12, 2015 Bonjour, J'ai migré un site internet de 1.4 vers 1.6 en y installant un thème, tout est OK sauf les pages de sitemap et contact, qui présentent une erreur quand je passe en mode développement dans le fichier de configuration, l'erreur est la même pour les 2 fichiers: Fatal error: Class 'ControllerFactory' not found in /home/smquebec/domains/smquebec.net/public_html/remorque2/contact-form.php on line 29 d'où vient le problème ? Merci beaucoup Link to comment Share on other sites More sharing options...
rem64 Posted May 12, 2015 Share Posted May 12, 2015 Bonjour, En première tentative vous pouvez supprimer le fichier class_index.php dans le dossier /cache. Puis vider le cache dans paramètre avancé -> performance. Si ça ne marche toujours pas merci de poster le fichier contact-form.php ici svp. 1 Link to comment Share on other sites More sharing options...
bikinos Posted May 12, 2015 Author Share Posted May 12, 2015 (edited) Bonjour, Merci pour cette réponse rapide... ça fait plaisir! J'ai supprimé le fichier class_index.php, j'ai maintenant ces 2 erreurs: ------Warning: require_once(/home/smquebec/domains/smquebec.net/public_html/remorque2/controllers/ContactController.php) [function.require-once]: failed to open stream: No such file or directory in /home/smquebec/domains/smquebec.net/public_html/remorque2/classes/ControllerFactory.php on line 43Fatal error: require_once() [function.require]: Failed opening required '/home/smquebec/domains/smquebec.net/public_html/remorque2/controllers/ContactController.php' (include_path='/home/smquebec/domains/smquebec.net/public_html/remorque2/tools/htmlpurifier/standalone:.:/usr/local/php53/lib/php') in /home/smquebec/domains/smquebec.net/public_html/remorque2/classes/ControllerFactory.php on line 43 ------ Voici le fichier contact_form.php: <?php/** 2007-2012 PrestaShop** NOTICE OF LICENSE** This source file is subject to the Open Software License (OSL 3.0)* that is bundled with this package in the file LICENSE.txt.* It is also available through the world-wide-web at this URL:* http://opensource.org/licenses/osl-3.0.php* If you did not receive a copy of the license and are unable to* obtain it through the world-wide-web, please send an email* to [email protected] so we can send you a copy immediately.** DISCLAIMER** Do not edit or add to this file if you wish to upgrade PrestaShop to newer* versions in the future. If you wish to customize PrestaShop for your* needs please refer to http://www.prestashop.com for more information.** @author PrestaShop SA <[email protected]>* @copyright 2007-2012 PrestaShop SA* @version Release: $Revision: 14007 $* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)* International Registered Trademark & Property of PrestaShop SA*/require(dirname(__FILE__).'/config/config.inc.php');ControllerFactory::getController('ContactController')->run(); Merci, Edited May 12, 2015 by bikinos (see edit history) Link to comment Share on other sites More sharing options...
bikinos Posted May 12, 2015 Author Share Posted May 12, 2015 (edited) Résolu Pour ceux qui ont le même problème, modifiez le fichier ControllerFactory ajoutez ce qui est en gras: class ControllerFactoryCore{ public static function includeController($className) { if (!class_exists($className, false)) { require_once(dirname(__FILE__).'/../controllers/front/'.$className.'.php'); if (file_exists(dirname(__FILE__).'/../override/controllers/front/'.$className.'.php')) require_once(dirname(__FILE__).'/../override/controllers/front/'.$className.'.php'); else { $coreClass = new ReflectionClass($className.'Core'); if ($coreClass->isAbstract()) eval('abstract class '.$className.' extends '.$className.'Core {}'); else eval('class '.$className.' extends '.$className.'Core {}'); } } } public static function getController($className, $auth = false, $ssl = false) { ControllerFactory::includeController($className); return new $className($auth, $ssl); }} Merci à toi Rem64 pour ta réponse rapide Edited May 12, 2015 by bikinos (see edit history) 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