overbags Posted March 24 Share Posted March 24 (edited) ciao a tutti ho un modulo che su prestashop 1.6 funziona benissimo, adesso che sono passato a prestashop 8.1 ha dei problemi. ho cercato l'aggiornamento ma è un modulo dismesso per cui mi sono provato a cercare il problema per poterlo utilizzarlo installandolo su un prestashop test. ho trovato un errore di chiamata jsonEncode e seguendo alcune guide ho sostituito jsonEncode con json_encode pensando di risolvere il problema ma purtroppo non è così e adesso sono fermo. qualche consiglio ? attivando il debug l'errore che da la pagina è Fatal error: Uncaught Error: Call to undefined method Tools::json_decode() in /web/htdocs/www.overbags.com/home/820/modules/ebayfeedback/ebayfeedback.php:463 Stack trace: #0 /web/htdocs/www.overbags.com/home/820/modules/ebayfeedback/ebayfeedback.php(431): EbayFeedback->getEbayFeedbackBoxTpl() #1 /web/htdocs/www.overbags.com/home/820/classes/Hook.php(1077): EbayFeedback->hookDisplayLeftColumn() #2 /web/htdocs/www.overbags.com/home/820/classes/Hook.php(418): HookCore::coreCallHook() #3 /web/htdocs/www.overbags.com/home/820/classes/Hook.php(983): HookCore::callHookOn() #4 /web/htdocs/www.overbags.com/home/820/config/smarty.config.inc.php(201): HookCore::exec() #5 /web/htdocs/www.overbags.com/home/820/classes/Smarty/SmartyLazyRegister.php(81): smartyHook() #6 /web/htdocs/www.overbags.com/home/820/var/cache/dev/smarty/compile/classiclayouts_layout_left_column_tpl/78/c9/c9/78c9c92ed40fc99b8edc80f82f8dc1bd5dc3df0a_2.file.layout-both-columns.tpl.php(255): SmartyLazyRegister->__call() #7 /web/htdocs/www.overbags.com/home/820/vendo in /web/htdocs/www.overbags.com/home/820/modules/ebayfeedback/ebayfeedback.php on line 463 Edited March 25 by overbags risolto (see edit history) Link to comment Share on other sites More sharing options...
Andrei H Posted March 24 Share Posted March 24 Ciao, Le sue scoperte sono corrette, deve sostituire Tools::jsonEncode con json_encode e Tools::jsonDecode con json_decode. json_encode e json_decode sono funzioni specifiche di PHP, non è necessario chiamarle dalla classe Tools, pertanto rimuovere la parte 'Tools::' dovrebbe risolvere l'errore. 1 Link to comment Share on other sites More sharing options...
Codencode Posted March 25 Share Posted March 25 Dalla versione 8.0.0 di Prestashop sono stati rimossi i metodi `Tools::jsonDecode()` e `Tools::jsonEncode()` e vanno sostituite (come già suggerito) con `json_decode()` e `json_encode()` Trovi maggiori dettagli qui: https://devdocs.prestashop-project.org/8/modules/core-updates/8.0/ https://www.prestashop.com/forums/topic/1067184-build-migrate-your-solutions-from-prestashop-17-to-80/ 1 Link to comment Share on other sites More sharing options...
overbags Posted March 25 Author Share Posted March 25 Buongiorno confermo che togliendo Tools:: tutto funziona bene grazie grazie mille 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