Hi All,
I've added in Caplinks fix (referenced here:
http://forums.bvcommerce...48508&g=48624#m48624)
Some time ago, and it had seemed to work fine when running through testing.
Now that the store is close to going live with products being entered, an error began to surface in a specific situation.
Caplink, If you're available to advise, or anyone else in the group, it would be a huge help at this about-to-launch stage
The error seems to revolve around the Best Category routine.
If we were to navigate into a category listing page, then into the product detail page. All is fine, the category navigation does it's thing.
However, If we access a product right from the Home page, or from the search page, or a product URL directly - WITHOUT - navigating into a category page first.
Then a .net error comes up mentioning "Object reference not set to an instance of an object."
If we back out of the error, then go into a category page. Then from that moment on, everything works fine for that session.
Including clicking through to a product page directly from the homepage or a search (which caused the initial error).
It's almost as if entering a category page... any category page is initializing something that avoids the error.
My first instinct was that the client didn't assign categories to the products when entering, but when checking via the admin, the categories are appearing.
I'll paste the error code below.
Has anyone else experienced this and fixed?
I'm guessing that the error is happening because it's not able to assign a best category for some reason (I suppose if there are multiple assigned and we're jumping to the page).
Is it possible to force a specific category (like a generic "specials" category I can create to work around the error)?
Caplink, if you're available to advise it would be a huge help.
Thanks All
-Dave
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 46: Else
Line 47: Dim bestCat As Catalog.Category = FindMaxDepthCategory(Catalog.InternalProduct.GetCategories(DirectCast(Me.Page, BaseStoreProductPage).LocalProduct.Bvin), 0, 0, Nothing)
Line 48: Catalog.Category.FindByBvin(bestCat.Bvin).FindParentsToRoot(_currentCategories)
Line 49: currentId = bestCat.Bvin
Line 50: End If
Source File: D:\Domains\nycpet.com\wwwroot\BVModules\ContentBlocks\Category Menu\view.ascx.vb Line: 48
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
BVModules_ContentBlocks_Category_Menu_view.LoadMenu() in D:\Domains\nycpet.com\wwwroot\BVModules\ContentBlocks\Category Menu\view.ascx.vb:48
BVModules_ContentBlocks_Category_Menu_view.Page_Load(Object sender, EventArgs e) in D:\Domains\nycpet.com\wwwroot\BVModules\ContentBlocks\Category Menu\view.ascx.vb:18
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433