Jump to content



Photo
- - - - -

Fatal error and navigation_history issue


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1   Roaddoctor

Roaddoctor
  • Members
  • 1,022 posts

Posted 02 March 2012 - 15:42

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

#2   MrPhil

MrPhil
  • Members
  • 5,244 posts

Posted 02 March 2012 - 16:50

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.

#3   Roaddoctor

Roaddoctor
  • Members
  • 1,022 posts

Posted 02 March 2012 - 18:33

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

#4   Roaddoctor

Roaddoctor
  • Members
  • 1,022 posts

Posted 02 March 2012 - 20:17

yep - solved my issue with a simple googling
http://www.oscommerc...php-t28405.html


poof
-Dave