MrMod62 Posted February 26, 2013 Share Posted February 26, 2013 (edited) Bonsoir, j'ai voulu faire un tour sur mon site et j'ai vu une erreur en haut de ma page d'acceuil et d'admin Voici l'erreur : /** @var _isActive Flag to know if the module is active or note */ public static $_isActive = -1; /** @var _isActive Flag to know if the module is active or note */ public static $_isActive = -1; public function addCSS($css_uri, $css_media_type = 'all') { if (self::_isActive()) { if (!is_array($css_uri)) $css_uri = array($css_uri); $new_uri = array(); foreach ($css_uri as $uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri) && preg_match('#.css$#', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; // Pass as reference, do not move $proto $new_uri[] = $proto.$uri; } else $new_uri[] = $uri; return parent::addCSS($new_uri, $css_media_type); } return parent::addCSS($css_uri, $css_media_type); } public function addJS($js_uri) { if (self::_isActive()) { if (!is_array($js_uri)) $js_uri = array($js_uri); foreach ($js_uri as &$uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; $uri = $proto.$uri; } } return parent::addJS($js_uri); } private static function _isActive() { if (self::$_isActive == -1) { // This override is part of the cloudcache module, so the cloudcache.php file exists require_once(dirname(__FILE__).'/../../../modules/cloudcache/cloudcache.php'); $module = new CloudCache(); self::$_isActive = $module->active; } return self::$_isActive && Configuration::get('CLOUDCACHE_API_ACTIVE'); } // Override for 1.5 public function init() { if (parent::$initialized) return; $ret = parent::init(); if (!self::_isActive()) return $ret; $assign_array = array( 'img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_store_dir' => _THEME_STORE_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'pic_dir' => _THEME_PROD_PIC_DIR_ ); /* // Add the images directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; */ /* // Add the CSS directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_; */ $httHost = Tools::getHttpHost(); $protocol_content = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? 'https://' : 'http://'; foreach ($assign_array as $assignKey => $assignValue) if (substr($assignValue, 0, 1) == '/' || $protocol_content == 'https://') $this->context->smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue); else $this->context->smarty->assign($assignKey, $assignValue); return $ret; } public function addCSS($css_uri, $css_media_type = 'all') { if (self::_isActive()) { if (!is_array($css_uri)) $css_uri = array($css_uri); $new_uri = array(); foreach ($css_uri as $uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri) && preg_match('#.css$#', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; // Pass as reference, do not move $proto $new_uri[] = $proto.$uri; } else $new_uri[] = $uri; return parent::addCSS($new_uri, $css_media_type); } return parent::addCSS($css_uri, $css_media_type); } public function addJS($js_uri) { if (self::_isActive()) { if (!is_array($js_uri)) $js_uri = array($js_uri); foreach ($js_uri as &$uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; $uri = $proto.$uri; } } return parent::addJS($js_uri); } private static function _isActive() { if (self::$_isActive == -1) { // This override is part of the cloudcache module, so the cloudcache.php file exists require_once(dirname(__FILE__).'/../../../modules/cloudcache/cloudcache.php'); $module = new CloudCache(); self::$_isActive = $module->active; } return self::$_isActive && Configuration::get('CLOUDCACHE_API_ACTIVE'); } // Override for 1.5 public function init() { if (parent::$initialized) return; $ret = parent::init(); if (!self::_isActive()) return $ret; $assign_array = array( 'img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_store_dir' => _THEME_STORE_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'pic_dir' => _THEME_PROD_PIC_DIR_ ); /* // Add the images directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; */ /* // Add the CSS directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_; */ $httHost = Tools::getHttpHost(); $protocol_content = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? 'https://' : 'http://'; foreach ($assign_array as $assignKey => $assignValue) if (substr($assignValue, 0, 1) == '/' || $protocol_content == 'https://') $this->context->smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue); else $this->context->smarty->assign($assignKey, $assignValue); return $ret; } Je suis sous prestashop 1.5, je ne vois pas du tout de ou se peut venir ? http://custom-controllers.fr/index.php Merci d'avance, Cordialement, MrMod62. Edited February 26, 2013 by MrMod62 (see edit history) Link to comment Share on other sites More sharing options...
Fabrice Posted February 26, 2013 Share Posted February 26, 2013 oulà !! joyeux bordel en fait. tu as activé l'affichage des erreurs : site en dév ? ou en production ? mais tu as en effet pas mal d'erreurs. l'ajout d'un produit au panier par exemple. Link to comment Share on other sites More sharing options...
MrMod62 Posted February 26, 2013 Author Share Posted February 26, 2013 (edited) Oui, un beau bordel ^^ je ne sais pas si il est activé ou pas.Je ne connais pas vraiment le panel du site et je touche seulement a se que je suis sur. j'ai pas ajouté de produit depuis 2 jours. Je espere que je vais pas devoir recommancé le site )= Edited February 26, 2013 by MrMod62 (see edit history) Link to comment Share on other sites More sharing options...
MrMod62 Posted February 26, 2013 Author Share Posted February 26, 2013 Bon laisse tomber je vais recommancé le site )= Link to comment Share on other sites More sharing options...
coeos.pro Posted February 26, 2013 Share Posted February 26, 2013 En fait le contenu affiché est le contenu du fichier modules/cloudcache/override/classes/Tools.php, Comment as tu installé le module cloudcache ? Link to comment Share on other sites More sharing options...
MrMod62 Posted February 26, 2013 Author Share Posted February 26, 2013 je l'avais installé directement a partir du panel Link to comment Share on other sites More sharing options...
coeos.pro Posted February 26, 2013 Share Posted February 26, 2013 avez vous essayé de le désactiver voir supprimer pour voir si ça règle le problème ? Link to comment Share on other sites More sharing options...
MrMod62 Posted February 26, 2013 Author Share Posted February 26, 2013 j'ai tout essaye sa n'a rien changé Link to comment Share on other sites More sharing options...
Broceliande Posted February 27, 2013 Share Posted February 27, 2013 Pour qu'une classe php s'affiche de la sorte (mode listing), il faut nécessairement qu'il ne soit pas reconnu comme tel. Souvent c'est parce qu'il manque la balise <?php au début du fichier (et en principe ?> à la fin de ce même fichier bien que ce ne soit pas obligatoire). Il serait aussi possible que l'extension .php ne soit pas parfaitement gérée comme script executable, mais ce serais le cas de tous les autres fichiers à priori. Link to comment Share on other sites More sharing options...
coeos.pro Posted February 27, 2013 Share Posted February 27, 2013 ce qui était bizarre c'est que ce n'est pas la totalité du fichier mais un grande partie... ça ne s'affiche plus maintenant... Link to comment Share on other sites More sharing options...
MrMod62 Posted February 27, 2013 Author Share Posted February 27, 2013 Oui c'etait très bizarre, mais j'ai reglé le probleme vu que je avait fait un sauvegarde de tout les fichier des que je avait fini les articles et les quelque regle du coup je les mis et maintenant sa marche bien 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