Gurnboy Posted October 5, 2013 Share Posted October 5, 2013 Hi there my site was working fine, but today I get an internal server error when pressing next from the address page when making an order. I have switched on the error log in the defines.inc file but nothing in the log, however the message Warning: Function addCSS() is deprecated in /home/linweb16/b/bucknalls.org.uk/user/htdocs/Home/ClicknCollect/modules/onlinebooking/onlinebooking.php on line 928in /home/linweb16/b/bucknalls.org.uk/user/htdocs/Home/ClicknCollect/classes/Tools.php on line 1777Warning: Function addJS() is deprecated in /home/linweb16/b/bucknalls.org.uk/user/htdocs/Home/ClicknCollect/modules/onlinebooking/onlinebooking.php on line 929in /home/linweb16/b/bucknalls.org.uk/user/htdocs/Home/ClicknCollect/classes/Tools.php on line 1777 is displayed on the front end of the site and I have no idea what it means. If anyone can help it would be much appreciated. Many Thanks G Link to comment Share on other sites More sharing options...
vekia Posted October 5, 2013 Share Posted October 5, 2013 hello these error means that your modules aren't fully compatibile with prestashop 1.5 in this case you have to modify modules and change $this->context->controller->addJS(); $this->context->controller->addCSS(); instead of old Tools::addJs(); & Tools::addCSS(); 2 Link to comment Share on other sites More sharing options...
Gurnboy Posted October 5, 2013 Author Share Posted October 5, 2013 (edited) This is what is on lines 928 and 929 respectively:- Tools::addCSS($this->_path.'css/'.Configuration::get('ob_stylesheet').'/jquery-ui-1.8.17.custom.css', 'all'); Tools::addJS($this->_path.'js/jquery-ui-1.8.17.custom.min.js'); Should I change it to:- Tools::$this->context->controller->addCSS(_path.'css/'.Configuration::get('ob_stylesheet').'/jquery-ui-1.8.17.custom.css', 'all'); Tools::$this->context->controller->addJS(_path.'js/jquery-ui-1.8.17.custom.min.js'); And do you ever get tired of people telling you how awesome you are? Many thanks G Edited October 5, 2013 by Gurnboy (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 5, 2013 Share Posted October 5, 2013 this is code that you have to use: Tools::$this->context->controller->addCSS($this->_path.'css/'.Configuration::get('ob_stylesheet').'/jquery-ui-1.8.17.custom.css', 'all'); Tools::$this->context->controller->addJS($this->_path.'js/jquery-ui-1.8.17.custom.min.js'); i haven't got possibility to test it right now, but tommorow i will be able to do that anyway, you can check it on your own store Link to comment Share on other sites More sharing options...
Gurnboy Posted October 5, 2013 Author Share Posted October 5, 2013 That's great thanks, it gets rid of the message on the front end, so think it has worked for that however still getting the internal server error. Thanks in advance for your help G Link to comment Share on other sites More sharing options...
Gurnboy Posted October 6, 2013 Author Share Posted October 6, 2013 Hi The message is definitely something to do with my online booking module. I have disabled it and no longer get the error message. It was originally written for v1.4.8 but I had it converted. I'm not doing any updates and I'm using prestashop v1.5.3.1 so not sure why it is necessary to change the code? Is it updating automatically and if so can I turn it off? Many Thanks again G Link to comment Share on other sites More sharing options...
El Patron Posted October 6, 2013 Share Posted October 6, 2013 Hi The message is definitely something to do with my online booking module. I have disabled it and no longer get the error message. It was originally written for v1.4.8 but I had it converted. I'm not doing any updates and I'm using prestashop v1.5.3.1 so not sure why it is necessary to change the code? Is it updating automatically and if so can I turn it off? Many Thanks again G the booking module was written for pre 1.5 ps release. If possible contact the developer to see if they have released 1.5 compatible module. Link to comment Share on other sites More sharing options...
Gurnboy Posted October 6, 2013 Author Share Posted October 6, 2013 (edited) Tried that but unfortunately they're not making an update. Do you know if prestashop auto updates or what could have caused this issue? Thanks G Edited October 6, 2013 by Gurnboy (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted October 9, 2013 Share Posted October 9, 2013 No, you need to adapt code to your version of PrestaShop. Link to comment Share on other sites More sharing options...
Gurnboy Posted October 10, 2013 Author Share Posted October 10, 2013 My Man in Malaysia has fixed it but not sure why it would bring up this error if not updating, any answers? Link to comment Share on other sites More sharing options...
Recommended Posts