Jump to content

Strange Error undefined useMobileTheme() after Upgrade from 1.5 to 1.6


demontage

Recommended Posts

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

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

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

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

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

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

  • 1 month later...

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 by Scully (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...