Oscommerce Common Issues/ Bugs: 3

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

This is another of the common issues I encounter almost on every new instance I work on. Issue resolution is very simple. Following the steps as below:

1. open includes/application_top.php
2. find the section of code

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

3. Replace the section with the following segment of code:

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

4. That should resolve the issue.. if not please send in a message, we can help you out.

Cheers,
Shiva

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

You must be logged in to post a comment.