Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

lotjonenjo

fatal error: Call to a member function add_current_page() on a non-object in catalog\includes\application_top.php on line 312

12 posts in this topic

I get this fatal error:

Fatal error: Call to a member function add_current_page() on a non-object in \htdocs\catalog\includes\application_top.php on line 312

 

I was trying to set up purchase_without_account mod...

Help please....

 

 

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

Share this post


Link to post
Share on other sites

should be an issue when register globals is set to off.

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

}

replace with

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

$navigation=$_SESSION['navigation'];

}

 

Satish

Share this post


Link to post
Share on other sites
Thanks your fix worked for me. :)

I take that back... now I am getting an error 500 on checkout_shipping because of this fix. Line 18 calls to $navigation->set_snapshot(); which is what my error_log is reporting as the problem.

Share this post


Link to post
Share on other sites

My hosting provider decided to upgrade his php to version 5 and turn off globals, and now I am getting the same error.

 

Ithought that if I overwrite the application_top.php with the version in the latest release, that would fix it, but the navigation history section does not appear anywhere at all not ever near line 125. SO where do I go now?

Share this post


Link to post
Share on other sites

Addendum

My hosting provider decided to upgrade his php to version 5 and turn off globals, and now I am getting the same error.

 

I thought that if I overwrite the application_top.php with the version in the latest release, that would fix it, but now, no products show on any page. visit http://www.cyberlink.net.au/ggl/ to see the effects! and suggestion?

Share this post


Link to post
Share on other sites
How do I turn on the register_globals?

 

You can turn on register globals through your .htaccess file like this

 

php_flag register_globals on

Share this post


Link to post
Share on other sites

Please help me :blink:

 

Fatal error: Call to a member function add_current_page() on a non-object in .../catalog/includes/application_top.php on line 312

 

$navigation->add_current_page();

Share this post


Link to post
Share on other sites

I've just been through this myself while uploading Basic Design Pack 2.5. (I'd moved the includes/boxes files that were going to be replaced into a back-up folder... and mistakenly moved one too many!)

 

The trick is to

 

(1) delete your website cookies (customer-side: no need to delete admin settings) after you receive the "Fatal error: Call to a member function..." message.

(2) Open your website again (do not refresh) and

(3) the actual error path for the missing file should be displayed, looking something like this:

Warning:
require(xxxx/xxxx/xxxx.php) [function.require]: failed to open stream: No such file or directory in /xxxx.../catalog/xxxx.../xxxx.php on line xxx

That line (or lines) in xxxx.php should tell you exactly what's missing. Happy hunting!

 

-C.

Share this post


Link to post
Share on other sites