Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error and navigation_history issue


Roaddoctor

Recommended Posts

Since moving a 2.3 shop to new server, I've had rare but occasional fatal crashes with the error like:

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

My Line 395: $navigation->add_current_page();

 

I've tried this change to /includes/application_top.php which seems to have stopped the fatal crashes, but is now causing redirect problems, such as during checkout with items in cart, upon login, being redirected to home page rather than checkout_shipping...

 

original code

// navigation history - original
 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();

 

modified code

// navigation history - modified / breaking checkout
 if (tep_session_is_registered('navigation')) {
if (PHP_VERSION < 4) {
  $broken_navigation = $navigation;
  $navigation = new navigationHistory;
  $navigation->unserialize($broken_navigation);
} else {
  $navigation = new navigationHistory;
}
 } else {
tep_session_register('navigation');
$navigation = new navigationHistory;
 }
 $navigation->add_current_page();

 

Would anyone be able to help me sort this out. Thank you much!

-Dave

Link to comment
Share on other sites

This error was discussed many, many times for version 2.2. I thought they had cleaned up the code for 2.3, but maybe they didn't. Did you upgrade to 2.3 or make a fresh install? Anyway, do a search for this problem and see if any of the suggested fixes work in your 2.3.1 code.

Link to comment
Share on other sites

my apology - I'm actually 2.2rc2a. I know thats not the best place to be and I'm workin on that....

i'll google it up further

 

any specific thread you can suggest?

 

thanks for the reply

-Dave

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...