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
rlopez397954  
#1 Posted : Saturday, April 11, 2020 11:49:16 AM(UTC)
rlopez397954

Rank: Advanced Member

Groups: Authorized User, Registered, Developers, HelpDesk
Joined: 11/30/2018(UTC)
Posts: 86

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
After upgrading from version 9.0.1.5867 to 9.0.2.6218 I'm getting these errors

Quote:
An error has occured at https://www.XXXXXX/Product/BuyProductDialog/2893 View less
Exception: Object reference not set to an instance of an object. Stack Trace: at AbleCommerce.Code.BuyProductDialog.GetChoiceSelectionsAttribute.LoadSelectedKitChoices(Product product, NameValueCollection form) at AbleCommerce.Code.BuyProductDialog.GetChoiceSelectionsAttribute.OnActionExecuting(ActionExecutingContext filterContext) 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.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.<.cctor>b__0(IAsyncResult asyncResult, Action action) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.b__5(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.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


I don't understand where this address is being generated from.(Product/BuyProductDialog/XXX). When I check this address in a browser it generates a 500 error. Maybe it's a bot hitting the product?

Thanks again for any help.
Ricky

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

Naveed Ashraf  
#2 Posted : Sunday, April 12, 2020 6:40:45 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
"BuyProductDialog" is a widget used at product display page. The respective ProductController Action Method "BuyProductDialog" seems throwing a null reference error when you access the product page.

There seems some issue with the product options and choices configuration for respective products.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
rlopez397954  
#3 Posted : Sunday, April 12, 2020 11:07:32 AM(UTC)
rlopez397954

Rank: Advanced Member

Groups: Authorized User, Registered, Developers, HelpDesk
Joined: 11/30/2018(UTC)
Posts: 86

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
Thanks for the feedback. This started happening after the upgrade. All of the products we have, do not have any variants, Options, specials, coupons i.e. that are listed in this production site.

I'm checking these products when an error is thrown in the DB directly _Products Table and I don't see any fields that look different or have any funny syntax or something that is causing this error to be thrown. My expertise is limited, so if something is standing out, I'm not seeing it.

I've run Debug on _BuyProductDialog.cshtml and still not seeing any problems. However, there was a change you made to this file as I can see this based on the update. Do you know what the AC change was? I'm looking at the old vs new to see what code change was implemented.

Last: The Product Widget has never been modified other than look and feel. It's being used out of the box.

Maybe just Gremlins here. I'll post my findings as I dig into this more.

Ricky



Naveed Ashraf  
#4 Posted : Monday, April 13, 2020 1:05:19 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
Thanks for the details.

If you do not have any options or choices then it may be some other issue. Please confirm few things:

1. You are seeing the error message when you browse any product page? or errors just spawning in the error log?

2. It may be related to some kit Products, and kit options. (BuyProductDialog.GetChoiceSelectionsAttribute.LoadSelectedKitChoices), so please check if any of your kit product have some issue?

I am looking into recent changes and trying to figure out if it is related to some recent changes.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
rlopez397954  
#5 Posted : Monday, April 13, 2020 8:07:15 AM(UTC)
rlopez397954

Rank: Advanced Member

Groups: Authorized User, Registered, Developers, HelpDesk
Joined: 11/30/2018(UTC)
Posts: 86

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
The errors are just spawning. This morning we have a bout 24 and there is no sequence in DB product ID or the time the error post.

We have no kitting or kitting options on any of our products.

Thanks again for your help.
Naveed Ashraf  
#6 Posted : Tuesday, April 14, 2020 1:45:47 AM(UTC)
Naveed Ashraf

Rank: Advanced Member

Groups: Admin, Administrators, Developers, Registered, HelpDesk, Authorized User
Joined: 7/31/2019(UTC)
Posts: 77

Was thanked: 8 time(s) in 8 post(s)
It seems you are right, it might be some bot.

Please try to figure out what IP address the bot user is using to access the website, for this first you need to figure out the user account (probably an anonymous user account) which bot is using, once you have the IP address, you can use the built in IP firewall to block that IP.

Admin/Security/Firewalls

Edit user page from admin shows the information about user page views (page URLs), and the IP address a user uses to access the website.

Edited by user Tuesday, April 14, 2020 1:49:11 AM(UTC)  | Reason: Not specified

Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
mazhar  
#7 Posted : Friday, May 1, 2020 8:06:09 PM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Hi, can you please run following query on your database and inspect the results
Code:
select TOP 50 * from ac_PageViews where UriStem like '%Product/BuyProductDialog/%' and RequestMethod = 'GET' order by PageViewId desc


I wonder if it gives some idea about traffic to these URLs. For example, if it's originating from specific IP address, does it have a refer, user agent information etc.
rlopez397954  
#8 Posted : Sunday, May 3, 2020 9:08:28 AM(UTC)
rlopez397954

Rank: Advanced Member

Groups: Authorized User, Registered, Developers, HelpDesk
Joined: 11/30/2018(UTC)
Posts: 86

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
mazhar I ran the query you provided and no records found.
mazhar  
#9 Posted : Sunday, May 3, 2020 11:48:30 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
Code:
select TOP 50 * from ac_PageViews where UriStem like '%Product/BuyProductDialog/%' order by PageViewId desc


Please give this a try again.
rlopez397954  
#10 Posted : Sunday, May 3, 2020 12:36:00 PM(UTC)
rlopez397954

Rank: Advanced Member

Groups: Authorized User, Registered, Developers, HelpDesk
Joined: 11/30/2018(UTC)
Posts: 86

Thanks: 8 times
Was thanked: 1 time(s) in 1 post(s)
mazhar that query as well found no records. I should elaborate a little more since I had this problem after the upgrade and my initial posting of this error. I ran through the DB PageViews and found a couple of IP addresses that were coming from Asia. Further review found them to be spam bots harvesting data.

I blocked the IP ranges through the Admin side and I also updated our robots.txt file with Product/BuyProduct folders. We are not seeing this error hourly but maybe once or twice a week. I have been deleting this error when doing the daily maintenance on the site. I assume that it why no records are being found using your query. So hopefully that helps.

Thanks again for your help.
Users browsing this topic
Guest (3)
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.