Call to a member function isLogged() on a non-object Opencart

Please LogIn to Reply!

Post By: guest | 01-24-2013 07:57 Reply

Question

Hi Guys

I've got a website set up on http://www.clearchoice.fr. If you've lucky you can view the website but on certain pages it gives a

Call to a member function isLogged() on a non-object in F:Websitesrb-clearchoice-fradmincontrollercommonheader.php on line 9
error. It's doing it sometimes and not on the same page every time. If it throws that error and you refresh that same page 10 sec later it's doing it.

Another strange thing is that it says that the problem is in the admin folder while you're only viewing the frontend?

I've also reinstalled opencart but no use. I'm quite certain that my config files (/config.php) and admin/config.php but I've attached them just in case.

Admin:
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://www.clearchoice.fr/admin/');
define('HTTP_CATALOG', 'http://www.clearchoice.fr/');
define('HTTP_IMAGE', 'http://www.clearchoice.fr/image/');

// HTTPS
define('HTTPS_SERVER', '');
define('HTTPS_IMAGE', '');

// DIR
define('DIR_APPLICATION', 'F:/Websites/rb-clearchoice-fr/admin/');
define('DIR_SYSTEM', 'F:/Websites/rb-clearchoice-fr/system/');
define('DIR_DATABASE', 'F:/Websites/rb-clearchoice-fr/system/database/');
define('DIR_LANGUAGE', 'F:/Websites/rb-clearchoice-fr/admin/language/');
define('DIR_TEMPLATE', 'F:/Websites/rb-clearchoice-fr/admin/view/template/');
define('DIR_CONFIG', 'F:/Websites/rb-clearchoice-fr/system/config/');
define('DIR_IMAGE', 'F:/Websites/rb-clearchoice-fr/image/');
define('DIR_CACHE', 'F:/Websites/rb-clearchoice-fr/cache/');
define('DIR_DOWNLOAD', 'F:/Websites/rb-clearchoice-fr/download/');
define('DIR_CATALOG', 'F:/Websites/rb-clearchoice-fr/catalog/');

(Ive left the db details out)
?>


Site config
Code: Select all
<?php
// HTTP
define('HTTP_SERVER', 'http://www.clearchoice.fr/');
define('HTTP_IMAGE', 'http://www.clearchoice.fr/image/');

// HTTPS
define('HTTPS_SERVER', '');
define('HTTPS_IMAGE', '');

// DIR
define('DIR_APPLICATION', 'F:/Websites/rb-clearchoice-fr/catalog/');
define('DIR_SYSTEM', 'F:/Websites/rb-clearchoice-fr/system/');
define('DIR_DATABASE', 'F:/Websites/rb-clearchoice-fr/system/database/');
define('DIR_LANGUAGE', 'F:/Websites/rb-clearchoice-fr/catalog/language/');
define('DIR_TEMPLATE', 'F:/Websites/rb-clearchoice-fr/catalog/view/theme/');
define('DIR_CONFIG', 'F:/Websites/rb-clearchoice-fr/system/config/');
define('DIR_IMAGE', 'F:/Websites/rb-clearchoice-fr/image/');
define('DIR_CACHE', 'F:/Websites/rb-clearchoice-fr/cache/');
define('DIR_DOWNLOAD', 'F:/Websites/rb-clearchoice-fr/download/');

Answers

Same error,please help.

reupload or remove the extension youve added that causes this.

I have faced similar situation yesterday as I also had to re-install my cart but no use. At least, here's what I did to get out of it:

1 - Before implementing any contributions, make sure to backup your database. Even though you re-install opencart's files on your FTP and you don't restore your database after those changes, the effect will remain the same and you'll turn around in circle for a while to find the problem.

2 - Regarding this problem:

Another strange thing is that it says that the problem is in the admin folder while you're only viewing the frontend?


Admin: $this->user->isLogged()
Frontend: $this->customer->isLogged()

Make sure the appropriate object is being used from one end to another.

It's doing it sometimes and not on the same page every time. If it throws that error and you refresh that same page 10 sec later it's doing it.


It also happened to me yesterday. This means that the token before this 10 secs delay did not refreshed from its action yet. Once the 10 secs passed, you may see different effect and permanent damage if codes were modified from the core. Since I restored my database and made sure the right objects were being used with the isLogged() method, my store was running fine again.

3 - You are seeing this error due to a loaded model declaration that may have been already declared from another extension / core files. This was my first encountered crash which I had to restore my database for even though the cache folder was cleaned up.

Note: The 10 secs delay may vary between servers. It is NOT a constant / defined value from OpenCart.

Tags:

call to a member function islogged() on a non-object in

call to a member function islogged() on a non-object

islogged

call to a member function islogged()

Reply Or Comment!
Please LogIn to Reply!