ace21gabriel Posted August 7, 2010 Posted August 7, 2010 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
chadcloman Posted August 7, 2010 Posted August 7, 2010 The fix at this link will solve the problem, although not the root cause of the damaged session. Check out Chad's News.
ace21gabriel Posted August 7, 2010 Author Posted August 7, 2010 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?
ace21gabriel Posted August 7, 2010 Author Posted August 7, 2010 Well I just removed $navigation->add_current_page(); 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?
chadcloman Posted August 7, 2010 Posted August 7, 2010 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.