logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
charles25686713  
#1 Posted : Monday, April 24, 2023 6:04:40 PM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 64

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi, with some trial and error, I was able to determine the below error, which I find on product pages every so often, is caused by there not being a product page set.

---
Exception: Object reference not set to an instance of an object. Stack Trace: at AbleCommerce.Controllers.ProductController.ProductTabs(ProductTabsWidgetParams parameters, Int32 id, Int32 categoryId) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.Async.AsyncResultWrapper.<>c.<.cctor>b__15_0(IAsyncResult asyncResult, Action action) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass5_0.<Wrap>b__0() at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func) at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)
---

When the product page causes it, it always causes it. The error is visible to the user, on the product page, on the left, under the image. And the product description does not display.

It would be nice if AC handled the lack of a category a little more gracefully. I was able to figure out the cause by looking at the Tabs (first line of the error) of a working page, and noticed there's a "related categories" tab. I'm guessing it fails hard without a category, to the point of the description not showing either?

Thanks,
Charles

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Katie S  
#2 Posted : Monday, April 24, 2023 6:49:27 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 430

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi,

If I understand correctly, you are saying these errors occur when the product has no category assignment. Is that right?

To find the products, I believe you can use a page we created awhile back. It's under Reports > System > Orphaned Items. It should give you a list of the products missing a category.

I'm not sure how this can happen. The user interface doesn't allow a product to be added unless it has a category assignment.

Hope this helps.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
charles25686713  
#3 Posted : Monday, April 24, 2023 7:07:41 PM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 64

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi, correct, these come up when there are no categories.

It's possible these products were created in AC gold before we converted to AC9, if that helps?

You're correct; you can't save the category tab without having a category selected. But it's not required to click on the category tab after creating a new product?
Katie S  
#4 Posted : Monday, April 24, 2023 10:23:10 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 430

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Even in Gold, any new products required a category. The only way this could have happened is if you added the product directly to the database using some other method outside of AbleCommerce.

You can create a product from the "Manage Products" page, but the first screen requires a category to be selected.

The second method to create a product is while you are in the Catalog, where you would be creating a product from the category you are currently browsing in.

It is really best to make sure the products all have categories. The system is designed that way.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
charles25686713  
#5 Posted : Monday, April 24, 2023 10:35:15 PM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 64

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
There must be some way the user figured out how to add it without a category.

I've seen this error a few times, and only today did I figure out what causes it.

I'll let you know if I see it again.

Thanks!
judy at Web2Market  
#6 Posted : Tuesday, April 25, 2023 6:04:54 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 289

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
We have had to figure out that error also and add code to cover it. We have one site so far where when a merchant assigns a product to an additional category, the category/catalog node entry is not completely saved. This is a 9.0.6 site. She hasn't been able to give me the steps taken so far, but it has happened several times. It's OK to have the orphaned items report to find the products once you know the issue, but the page will keep throwing the error if you don't know there is an issue.
charles25686713  
#7 Posted : Tuesday, April 25, 2023 8:02:08 AM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 64

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
I scoured the error logs and found this one product is the only product that has had the error in the recorded history of errors.

Granted I do purge the error log of old data every so often, but it's entirely possible this is the only page that has had the error.

I'll post if I see it again.

Thanks again for your prompt response Katie!

Charles
Katie S  
#8 Posted : Wednesday, April 26, 2023 1:13:31 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 430

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
This makes more sense. If the product is already added and the issue happens when trying to attach it to other categories, then maybe there is a bug that needs to be fixed. I'll try to reproduce and report back if I find anything.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Katie S  
#9 Posted : Thursday, May 4, 2023 1:31:55 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 430

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
I've spent some time trying to reproduce this issue with no luck.

I created several categories, assigned a product to each of them, and then removed some of the extra categories. The product remains and is still attached to the first category.

I also added a product to a category, then assigned it to another category. Removed the first category and the product is still attached to the second category.

Whatever the steps are to reproduce, it must not be too common. If there is any other information to report, please post it here.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.