demontage Posted May 30, 2017 Share Posted May 30, 2017 Hello, after upgrading from 1.5.6.3 to 1.6.1.13 a get this error Fatal error: Call to undefined method IndexController::useMobileTheme() in .../classes/controller/Controller.php on line 536 The error shows on every theme and page even the default unchanged one...all modules are up to date. Can't find any solution.. maybe someone have some ideas where to look for the cause of this error. Thank You Link to comment Share on other sites More sharing options...
bellini13 Posted May 31, 2017 Share Posted May 31, 2017 are you trying to use the old default theme (from ps v1.5)? Or did you update to use the new default-bootstrap theme (from v1.6) Link to comment Share on other sites More sharing options...
demontage Posted May 31, 2017 Author Share Posted May 31, 2017 No, I'm using new 1.6 default bootstrap theme, nothing was changed. The error shows on every theme Link to comment Share on other sites More sharing options...
bellini13 Posted June 1, 2017 Share Posted June 1, 2017 I would try a few basic things first 1) Clear your smarty cache 2) Check if you have any type of server cache active, you might need to ask your hosting provider. If you do, try to clear it. 3) Might as well try clearing your browser cache and cookies, it can't hurt 4) Make sure you have no old modules and overrides installed that could be causing the issue. In the back office, advanced parameters > performance page, enable the 2 debug options that disable overrides, and disables non-ps modules Link to comment Share on other sites More sharing options...
demontage Posted June 1, 2017 Author Share Posted June 1, 2017 Thank You, I did all of this but nothing has changed http://testin.cobisacarp.com/ Link to comment Share on other sites More sharing options...
bellini13 Posted June 2, 2017 Share Posted June 2, 2017 Then I would suggest opening the IndexController.php located in /controllers/front/ and confirming that you see this line class IndexControllerCore extends FrontController and then open FrontController.php located in /classes/controller and confirm you find this function protected function useMobileTheme() What device are you using to test the store? Is it a mobile device or a desktop browser? In your back office Preferences > themes page, under the "mobile" menu tab, there is a field "Enable the mobile theme", what radio button option is selected? Does changing it to "i'd like to disable it" option fix the issue? Link to comment Share on other sites More sharing options...
demontage Posted June 5, 2017 Author Share Posted June 5, 2017 I have these lines on files You mentioned... I'm testing on desktop, tried all options these radio buttons without change. What's interesting on mobile or when I remove the line 536 if (!$this->useMobileTheme() && $this->checkLiveEditAccess()) { $live_edit_content = $this->getLiveEditFooter(); } the store is partly working but no scripts working and many notices like Notice: Undefined index: is_logged in ../tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 29 Notice: Trying to get property of non-object in /tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 39 Now visible on http://testin.cobisacarp.com/ Link to comment Share on other sites More sharing options...
bellini13 Posted June 7, 2017 Share Posted June 7, 2017 store is in maintenance mode, so no longer visible. what Operating System and Browser are you using? Have you tried from a different computer and/or browser? Link to comment Share on other sites More sharing options...
demontage Posted June 7, 2017 Author Share Posted June 7, 2017 Yes, tried from many computers and devices. Now the site is visible! Link to comment Share on other sites More sharing options...
bellini13 Posted June 8, 2017 Share Posted June 8, 2017 Any particular reason you have overrides installed? Especially ones that do not work properly with your version of Prestashop? Did you try to disable overrides and non-ps modules from the advanced parameters page in the back office? Perhaps you have some module or customization/override installed that is causing the issue... Link to comment Share on other sites More sharing options...
demontage Posted June 9, 2017 Author Share Posted June 9, 2017 No overrides, non-ps module are disabled... Link to comment Share on other sites More sharing options...
bellini13 Posted June 10, 2017 Share Posted June 10, 2017 Why do you have this warning? This suggests that you have customized the FrontController in a way that is not compatible with the parent Controller class Strict Standards: Declaration of FrontControllerCore::addCSS() should be compatible with ControllerCore::addCSS($css_uri, $css_media_type = 'all', $offset = NULL, $check_path = true) in /www/cobisacarp_www/www/testin.cobisacarp.com/controllers/front/FrontController.php on line 1154 Link to comment Share on other sites More sharing options...
demontage Posted June 12, 2017 Author Share Posted June 12, 2017 Thats a good question! A have even replaced this file to be sure it's not changed. Link to comment Share on other sites More sharing options...
bellini13 Posted June 13, 2017 Share Posted June 13, 2017 and yet you still have the warning about the addcss function. Apparently you have done something out of the ordinary that is causing this issue Link to comment Share on other sites More sharing options...
demontage Posted June 19, 2017 Author Share Posted June 19, 2017 It turned out that all this was caused by file that was left after upgrade from old prestashop classes/controller/FrontController.php, after deleting this file everything is fine... Link to comment Share on other sites More sharing options...
bellini13 Posted June 21, 2017 Share Posted June 21, 2017 just to make sure I understand you properly... you removed /classes/controller/FrontController.php? Link to comment Share on other sites More sharing options...
demontage Posted August 5, 2017 Author Share Posted August 5, 2017 (edited) Sorry my mistake, I deleted /controllers/front/FrontController.php Edited August 5, 2017 by demontage (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted August 5, 2017 Share Posted August 5, 2017 (edited) VERY CONFUSING ! The file /controllers/front/FrontController.php isn't there in normal circumstances. This file is located in /classes/controller or in the respective path in the /overrides directory. If you really deleted /classes/controller/FrontController.php then you must still have some kind of override. If not, your system would trow fail messages on all front end pages. Edited August 5, 2017 by Scully (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