walidbens Posted March 7, 2022 Share Posted March 7, 2022 Je galère là! Je suis en-train de travailler sur le site d'un client qui a besoin d'un nouveau template. Je prends mes précautions en faisant un backup de tout le serveur chez moi, je néttoie plusieurs fichiers et dossiers inutiles ( en rouge), je télécharge le nouveau template, et balance le zip sous www/theme; j'essaie d'installer le theme sous presta, et un message d'erreur me dit qu'il ne fonctionne qu'à partir de Présta 1.7.6 et que je suis sous 1.7.5. Je vais sur 1-click upgrade et à faire le nécessaire, l'upgrade se termine avec un message d'erreur me disant que j'ai un problème sur le composer, qu'il à besoin de la version PHP 7.1.3. Maintenant quand je vais sur le site, je n'ai qu'un écran blanc, sans aucun message d'erreure. https://www.dstockimport.fr Quelqu'un peut m'aider à résoudre ça !? Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 Bonjour, 1 Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 @Mediacom87 Merci pour ta réponse, J'ai ouvert OVH, j'ai fait une mise à jour de PHP de 7.0 à 7.3 Maintenant, j'ai un autre message d'erreure: Warning: Declaration of Link::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $id_lang = NULL, $id_shop = NULL, $ipa = 0, $force_routes = false, $relative_protocol = false, $add_anchor = false, $extraParams = Array) should be compatible with LinkCore::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) in /home/dstockimxy/www/override/classes/Link.php on line 0 Fatal error: Uncaught Unknown column 'h.active' in 'where clause'<br /><br /><pre>SELECT name FROM `pre5186_hook` h WHERE (h.active = 1) </pre> thrown in /home/dstockimxy/www/classes/db/Db.php on line 769 Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 Activez le mode debug pour identifier plus précisément le souci. 1 Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 C'est déjà fait, dans config/defines.inc.php /* Debug only */ if (!defined('_PS_MODE_DEV_')) { define('_PS_MODE_DEV_', true); } Le message que j'ai collé est visible partout sur le site; vous avez une autre manière d'identifier le souci !? Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 Pardon j'avais mal lu le message d'erreur qui est précis pourtant. L'override est codé sur l'ancien appel de la fonction il faut donc l'adapter comme cela est expliquer. Link::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $id_lang = NULL, $id_shop = NULL, $ipa = 0, $force_routes = false, $relative_protocol = false, $add_anchor = false, $extraParams = Array) Le nouveau LinkCore::getProductLink($product, $alias = NULL, $category = NULL, $ean13 = NULL, $idLang = NULL, $idShop = NULL, $idProductAttribute = NULL, $force_routes = false, $relativeProtocol = false, $withIdInAnchor = false, $extraParams = Array, bool $addAnchor = true) il y a un paramètre en plus à la fin de l'appel de la fonction. 1 Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 Pardon mais est ce que le nouveau code doit être ecrit dans la premiere ligne du fichier link.php ( /home/dstockimxy/www/override/classes/Link.php on line 0 ) ? C'est bien ça !? Parceque je ne vois l'ancien code nulle part Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 getProductLink Mais peut être suffirait il d'avoir la version du module qui a fait l'override compatible avec votre version de Prestashop. Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 Ou bien, il faut changer le nom de la classe Link par LinkCore et ajouter le parametre $addanchor=true en bas Comme ça: class LinkCore extends LinkCore { /** * * @author */ /* * module: giftcard * date: 2018-11-21 10:10:50 * version: 2.1.34 */ public function getProductLink( $product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false, $relative_protocol = false, $add_anchor = false, $extraParams = array() bool $addAnchor = true, Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 il y a une heure, walidbens a dit : Ou bien, il faut changer le nom de la classe Link par LinkCore et ajouter le parametre $addanchor=true en bas non 1 Link to comment Share on other sites More sharing options...
Mediacom87 Posted March 7, 2022 Share Posted March 7, 2022 Vous devez adapter le code pour correspondre à l'appel originel de cette fonction rien de plus. mais vous pouvez aussi soliciter le créateur de ce module et peut être même que vous avez le bon override dans le module si vous avez la dernière version. 1 Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 @Mediacom87Merci bien pour ton temps et tes réponses, mais je ne suis pas vraiment capable de corriger l'erreure moi même vu que je galère dans le code. Je me suis basé sur ce thread pour corriger le fichier Link.php maintenant, j'ai un nouveau message d'erreure: Fatal error: Uncaught Unknown column 'h.active' in 'where clause'<br /><br /><pre>SELECT name FROM `pre5186_hook` h WHERE (h.active = 1) </pre> thrown in /home/dstockimxy/www/classes/db/Db.php on line 769 Link to comment Share on other sites More sharing options...
walidbens Posted March 7, 2022 Author Share Posted March 7, 2022 (edited) /** * Displays last SQL error. * * @param string|bool $sql * * @throws PrestaShopDatabaseException */ public function displayError($sql = false) { global $webservice_call; $errno = $this->getNumberError(); if ($webservice_call && $errno) { $dbg = debug_backtrace(); WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { if ($sql) { throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); /*LA LIGNE 769 dans DB.php */ } throw new PrestaShopDatabaseException($this->getMsgError()); } } Edited March 7, 2022 by walidbens (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