Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.



Recommended Posts

I was installing cDynamic Meta Tags mod and now I have the error below on my site, the file listed is not even a file that get's edited so im not sure how it would be messed up. Any help is appreciated!


Fatal error: Call to a member function add_current_page() on a non-object in /home/content/34/6523734/html/includes/application_top.php on line 321
Link to comment
Share on other sites

What exactly dose that mean? I now found out that the site will work when the WWW part of the URL is removed, but all the default links on the site have the WWW in them, dose that help anyone figure out what may have went wrong?

Link to comment
Share on other sites

Well I just removed




on line 321 includes/application_top.php


and now everything works fine, but will that be a problem down the line or cause any of my mods to not work properly?

Link to comment
Share on other sites

but will that be a problem down the line or cause any of my mods to not work properly?

The navigationHistory class (an instance of which is stored in the $navigation variable) is used to keep track of what page you came from, for those cases when you need to temporarily redirect to another page. The best example of this is when you try to checkout without having first logged in. You will be redirected to the login page, and then once you've successfully logged in, the navigation information will be used to send you back to the checkout page. Another example is when you click the "Continue Shopping" button when viewing the shopping cart. This will take you back to the page you came from. By removing that line, you're taking away this ability, and you're still leaving yourself open to other "fatal error" crashes when $navigation is used in other parts of the code.


Navigation information is stored in the session, and sometimes it gets corrupted or out of sync. (I've seen this happen when I copied the database, which contains the session information, to another copy of the store.) Unfortunately, the code in application_top.php does not handle that situation well, and you get the add_current_page() error. If you're using cookies to keep track of the session ID, and you delete your cookies, then the error will go away. If you wait long enough, the session will time out and the error will go away. If your session store is 'mysql' and you remove all the records from the sessions database table, the error will go away. A more permanent fix is specified in this link, which I gave you in my previous post.


The fact that you see the problem with "www" but you don't see it without the "www" probably means it has something to do with how your cookies are saved. In your catalog/includes/configure.php file, you'll see defines for HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN. These should not include the "www".


It's also possible that the changes you made for the Dynamic Meta Tags add-on are somehow changing or corrupting the session.



Check out Chad's News.

Link to comment
Share on other sites


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

  • Create New...