RockStar360 Posted July 5, 2017 Share Posted July 5, 2017 Hi people. Prestashop 1.7 works fine whit multishop, but after i installed Transformer 4 template, the first shop i applied the template wors fine, but the others, get an error 500. If i activate debug sql i get this; Whoops, looks like something went wrong. 1/1 ContextErrorException in Tools.php line 2704: User Warning: Function <b>getAssetUriFromLegacyDeprecatedMethod()</b> is deprecated in <b>/home/niponadmin/public_html/classes/controller/FrontController.php</b> on line <b>1127</b><br />in Tools.php line 2704 at ErrorHandler->handleError('512', 'Function <b>getAssetUriFromLegacyDeprecatedMethod()</b> is deprecated in <b>/home/niponadmin/public_html/classes/controller/FrontController.php</b> on line <b>1127</b><br />', '/home/niponadmin/public_html/classes/Tools.php', '2704', array('error' => 'Function <b>getAssetUriFromLegacyDeprecatedMethod()</b> is deprecated in <b>/home/niponadmin/public_html/classes/controller/FrontController.php</b> on line <b>1127</b><br />', 'message' => 'Backward compatibility for this method couldn't be handled. Use $this->registerJavascript() instead', 'class' => 'FrontControllerCore')) at trigger_error('Function <b>getAssetUriFromLegacyDeprecatedMethod()</b> is deprecated in <b>/home/niponadmin/public_html/classes/controller/FrontController.php</b> on line <b>1127</b><br />', '512') in Tools.php line 2704 at ToolsCore::throwDeprecated('Function <b>getAssetUriFromLegacyDeprecatedMethod()</b> is deprecated in <b>/home/niponadmin/public_html/classes/controller/FrontController.php</b> on line <b>1127</b><br />', 'Backward compatibility for this method couldn't be handled. Use $this->registerJavascript() instead', 'FrontControllerCore') in Tools.php line 2673 at ToolsCore::displayAsDeprecated('Backward compatibility for this method couldn't be handled. Use $this->registerJavascript() instead') in FrontController.php line 1917 at FrontControllerCore->getAssetUriFromLegacyDeprecatedMethod('/themes/transformer/assets/js/tools/treeManagement.js') in FrontController.php line 1127 at FrontControllerCore->addJS(array('/themes/transformer/assets/js/tools/treeManagement.js')) in stblogarchives.php line 114 at StBlogArchives->hookHeader(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '22')) in Hook.php line 895 at HookCore::coreCallHook(object(StBlogArchives), 'hookHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '22')) in Hook.php line 331 at HookCore::callHookOn(object(StBlogArchives), 'displayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => '22')) in Hook.php line 843 at HookCore::exec('displayHeader') in FrontController.php line 533 at FrontControllerCore->initContent() in IndexController.php line 37 at IndexControllerCore->initContent() in Controller.php line 205 at ControllerCore->run() in Dispatcher.php line 369 at DispatcherCore->dispatch() in index.php line 28 Im a bit lost. I apreciat if you can help me. Thank Yoyu! Link to comment Share on other sites More sharing options...
Preskaribou Posted November 14, 2023 Share Posted November 14, 2023 news ? Link to comment Share on other sites More sharing options...
dnk.hack Posted November 15, 2023 Share Posted November 15, 2023 Hello, I suppose you use an old version of the theme. The reason is in the classes/controller/FrontController.php Link to comment Share on other sites More sharing options...
ps8modules Posted November 15, 2023 Share Posted November 15, 2023 Hi. StBlogArchives), 'hookHeader' indicates hook incompatibility. In new versions of Prestashop, it is necessary to change hookHeader to hookDisplayHeader. There are many tutorials that I have written in the forum. Link to comment Share on other sites More sharing options...
Preskaribou Posted November 15, 2023 Share Posted November 15, 2023 ok do you have the doc somewhere ? where do I need to change that ? Link to comment Share on other sites More sharing options...
ps8modules Posted November 15, 2023 Share Posted November 15, 2023 You have more of those problems there. 1. you need to change the old hook to a new one /* OLD $this->registerHook('header'); */ $this->registerHook('displayHeader'); /* OLD public function hookHeader() */ public function hookDisplayHeader() 2. it is necessary to change the loading of JavaScript and possibly also CSS /* OLD $this->registerJavascript() */ $this->context->controller->addJs(.....); /* OLD $this->registerStylesheet() */ $this->context->controller->addCSS(.....); And certainly many more that are not visible from your error report. As @dnk.hack wrote, you need to update your transformer theme. Link to comment Share on other sites More sharing options...
Preskaribou Posted November 15, 2023 Share Posted November 15, 2023 in which file ? for prestashop 1.7.6.5 ? Link to comment Share on other sites More sharing options...
ps8modules Posted November 15, 2023 Share Posted November 15, 2023 (edited) First you need to see your debug log. The log shows which module is causing the problem. The main PHP file of the module is being modified. Edited November 23, 2023 by ps8moduly.cz (see edit history) Link to comment Share on other sites More sharing options...
Preskaribou Posted November 15, 2023 Share Posted November 15, 2023 (edited) I have this and this ? Edited November 18, 2023 by Preskaribou (see edit history) 1 Link to comment Share on other sites More sharing options...
Preskaribou Posted November 22, 2023 Share Posted November 22, 2023 new ? 1 Link to comment Share on other sites More sharing options...
ps8modules Posted November 22, 2023 Share Posted November 22, 2023 New what ?? are you spamming the forum? Link to comment Share on other sites More sharing options...
Preskaribou Posted November 23, 2023 Share Posted November 23, 2023 no why 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