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

2 Pages12>
Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Thursday, July 16, 2020 11:46:33 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
We have upgraded a site from Gold to 9.0.2 and the product page is showing this error. We haven't touched the page and I am not getting the same error on my local site.
Help, please!
Thanks
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. View less
Exception: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. Stack Trace: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) at CommerceBuilder.Web.Extensions.HtmlExtensions.SafeRenderAction(HtmlHelper html, String actionName, String controllerName, Object routeValues) Inner Exception: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. Inner Exception Stack Trace: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) at System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, Object routeValues) at ASP._Page_Views_Product__ProductTabs_cshtml.Execute() in C:\inetpub\wwwroot\wellington_ac9\Views\Product\_ProductTabs.cshtml:line 46 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) 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.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.b__3() 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) Inner Exception: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. Inner Exception Stack Trace: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) at System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, Object routeValues) at ASP._Page_Views_Product__ProductTabs_cshtml.Execute() in C:\inetpub\wwwroot\wellington_ac9\Views\Product\_ProductTabs.cshtml:line 46 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) 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.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.b__3() 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)

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

Naveed Ashraf  
#2 Posted : Friday, July 17, 2020 6:09:12 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)
Quote:
C:\inetpub\wwwroot\wellington_ac9\Views\Product\_ProductTabs.cshtml:line 46



Please check the line 46, in this view file. If its not modified then at this line it tries to render the "MoreCategoryItems" action. Please try to debug and try figure out whats the issue with "MoreCategoryItems" action rendering.

@{ Html.RenderAction("MoreCategoryItems",
new
{
Orientation = "Horizontal",
MaxItems = ViewBag.Parameters.MaxItems,
DisplayMode = ViewBag.Parameters.DisplayMode,
CategoryId = ViewBag.Parameters.CategoryId,
showPanelView = false,
ShowSku = true,
ShowProductReviews = true,
//ShowInventoryMessage = false,
ShowManufacturer = false,
ShowProductSummary = false,
ShowProductQuickViewDisplay = false
}); }

The error message you have posted do not provide much details about it.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
judy at Web2Market  
#3 Posted : Monday, July 20, 2020 6:39:58 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
That is the correct code for line 46. How can I debug since this is not a local site where I can step through the code in Visual Studio?
Thanks
Naveed Ashraf  
#4 Posted : Monday, July 20, 2020 6:58:46 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)
Hi,

If you have not customized the "MoreCategoryItems" widget, then there may be some issue with one of the product in same category.

There are two ways you can try some debugging:

1. Login to admin and for all products in same category change the visibility to private or hidden, and then reload the product page. Check if the problem still exists. Next step start changing the product's visibility back to Public, one by one, and try to figure out which product have issue and why.

2. Login as admin and visit the product page, and enable "Admin Mode", and for "Product Tabs" section check if all the admin configuration parameters are good.

[img=https://ibb.co/2ZSxcB2]Product tabs[/img]

Try changing some values which are related to "More category Items", for example the caption, max items etc.

Thanks.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
judy at Web2Market  
#5 Posted : Tuesday, July 21, 2020 1:12:12 PM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I tried changing some of the parameters, like max items, caption and nothing change.
Then I set products in a category to hidden and public, using two items for test. When viewing the hidden one, there was no error and the other product showed under Also in Category. When viewing the public one, I got the error on Also in Category.
product A public, product B hidden-Product A throws error, Product B doesn't
product A hidden, product B public- product B throws error, Product A doesn't

How can I fix?
Thanks
ray22901031  
#6 Posted : Tuesday, July 21, 2020 5:06:37 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Hi Judy,

I never had the issues that you described, but when ever I had a problem with the item tabs, it was because I had an issue with my HTML code in the description, but in my case the tabs just refuse to function. I also didn't do a convert from gold.

Questions:

If you create a brand-new category, and just manually enter two products in the new category, Do you still have the same problem?
If the answer is no?

Move 2 of the products to this new category and see if you still have the same problem.
If the answer is no - then there seems to be an issue with the categories.
If the answer is yes - there could be a value in the products and things get out of whack

Things to try:

I am pretty sure that you have more than two products that are experiencing this problem, but you just want to deal with two items at this point. Move them to a new category so you don't have to deal with other products.

Exports the two products into a spreadsheet using every single available field suggested in ablecommerce. Make a copy of the spreadsheet, and used the copy to manipulate data. Replace your product description with a very simple html code like <p> hello World </p>.

Start replacing Long and complex values with simple ones, and re-import back into the system.

If you happen to have a working product that works under a category were another product does not, export both, the one that works and the one that doesn't into the spreadsheet and just poke around to see if there's anything out of the ordinary when it comes to data.

The sticking point here is, you said it works great on one computer system, but not the other, so at that point, what's the difference between systems?

Different operating systems ???
Different SQL database versions ???
What about the difference IIS versions, are they the same ???
What about the application pool in IIS, are they the same, is there a difference in the settings Between systems ???

Very difficult to troubleshoot when one is not there, The only thing I can share with you is when ever I have problems with item was because of the following reasons:

#1. In the early version of Ablecommerce 9 MVC, I had a problem if a product was listed under more than one categories, that affected the tabs, but that was fixed.
#2 There was a problem in my HTML, usually a missing or extra tag that would expose the container to the overall code when the page loads, sometimes it was more than obvious because the page would look horrible, but at other times the page would look fine but the tabs would not work.

If you wish, export a few products using the built-in tools, post as an attachment, and I will create a new category on my end on my working system and import your products to see what my system does.

Interesting problem, would love to see a solution.

PS: Tell Dan that Ray from Miami-Dade (the official epicenter of the coronavirus) says "hi". still working on trying to get my system up and running.

Hope some of this helps.

Edited by user Tuesday, July 21, 2020 5:09:25 PM(UTC)  | Reason: Not specified

judy at Web2Market  
#7 Posted : Wednesday, July 22, 2020 5:59:02 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Thanks for the suggestions, Ray. The issue so far has been with every product.I did try with some products and a category that were added after the upgrade and still had the issue.
ray22901031  
#8 Posted : Wednesday, July 22, 2020 9:13:48 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Just to make sure that I understand correctly, after the conversion you are running the site locally and everything is working but on the remote computer it is not.
judy at Web2Market  
#9 Posted : Wednesday, July 22, 2020 9:21:59 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I have added a new category with a new product in it with price and name only populated. The product page still throws the error if the product is public. If I change the product to hidden, the page doesn't throw the error. If I add a new product to the category and have that product as public the page for the first product doesn't throw an error. The page for the second product does throw the error, though. If I change the second product to hidden, the page doesn't throw the error,even if I make the first product public.
I have just compared all the model, controller, and view files and they are all the same on local and remote site. AbleCommerce dll is the same.
Local site was set up as new install with AC sample products. Remote was from an R12 upgrade to AC 9.
judy at Web2Market  
#10 Posted : Wednesday, July 22, 2020 9:48:45 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I took all the content out of _MoreCategoryItems.cshtml and still got the same error.
ray22901031  
#11 Posted : Wednesday, July 22, 2020 10:22:52 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Okay so the remote computer and the local computers are not running identical versions. One is a convert and the other is a fresh install. I think it's more than obvious that something did not convert properly.

I personally hate conversions, and it brings back all types of nightmares especially when I used to do desktop programming in Delphi.

Without being there, and looking at all the parameters it is extremely difficult to try to isolate the problem.

I'm not sure how much custom code was in the converted version, but I'll just throw some stuff out there and I apologize if any of these were already done.

Since the database has already been converted, hopefully correctly, have you tried making a copy of the converted database, moving into the local working machine, editing the config file so it uses that particular database instead, avoiding any CSS files from the converted version at this time?

The database should have all the orders, all the products and history, just to make sure the data works and the issue is not that the database did not convert properly?

Of course I'm also assuming in the converted version for troubleshooting, that the theme is set for store default, and both page templates are defaults.

I got a funny feeling that the remote computer something is not set up properly, and I hate to say this, but try the conversion again on a different computer.

Support will have to acknowledge the differences in viewing the link in hidden mode or public mode, there really should be no difference except one is done by the menu system inside of Ablecommerce and the other is just typed or pasted into the browser, they both take you to the same place and are using the same browser session ID, makes no sense.

Personally if this occurred to me, again as stated above, I would just use another computer and try to reconvert again. The fact that you are manually entering new products and they are exploding on you, something did not convert properly.

I hope some of this helps and I look forward when you find the resolution to this problem.

-Ray
judy at Web2Market  
#12 Posted : Thursday, July 23, 2020 6:41:19 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Thanks, Ray. The files are the same on both sites. I've asked for a backup of the remote site database so I can connect my local site to that. So many of these error messages in AC9 are not helpful- I don't know if that's just the way MVC is or not.
judy at Web2Market  
#13 Posted : Thursday, July 23, 2020 7:49:56 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
More input: If I drag the More Category Items over from the left section, it doesn't throw an error. If I replace the More Category Items with the Related products on the Products tab with the applicable parameters, it doesn't throw an error.
Oops, that was on local site. If I drag the More Category Items to the page on the remote site, I get the error specified cast is not valid.
Error log entry:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. View less
Exception: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.Stack Trace: at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) at CommerceBuilder.Web.Extensions.HtmlExtensions.SafeRenderAction(HtmlHelper html, String actionName, String controllerName, Object routeValues) Inner Exception: Specified cast is not valid.Inner Exception Stack Trace: at NHibernate.Impl.AbstractQueryImpl.UniqueResult[T]() at AbleCommerce.Controllers.ProductController.MoreCategoryItems(MoreCategoryItemsParams parameters, Boolean showPanelView) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.b__12() 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.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>c__DisplayClass4.b__3() 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)

Edited by user Thursday, July 23, 2020 8:21:25 AM(UTC)  | Reason: Not specified

ray22901031  
#14 Posted : Thursday, July 23, 2020 2:24:00 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Although this problem is quite interesting, I can imagine the frustration that you're going through.

If I had to troubleshoot this problem, I would like to rule out the database completely. Although this seems to be a "view" problem, who's to say that corruption in the category tables linking to the products might be causing this. Though I'm going to assume it's unlikely since you're able to view it in hidden mode. But the database is a big piece, and I would just rule it out once I connected to a fresh install of AC9. I have had issues with CSS and missing HTML tags causing problems with my product tabs before.

Since you're able to store in-line CSS in the descriptions, also in the header section at the database level, it would just be nice to rule this out as the main cause or contributing cause to your problem. Are any of the products running any Java scripts inside the header section which could stored in the database?

I also don't know how much custom programming you have, or if you rely heavily on external CSS stylesheets, so it is extremely difficult for somebody outside to offer advice.

If for some reason, you do link the database, hopefully after a successful conversion to a new install of AC9, and these problems persist, I would, reestablish the link with the original database, go to the converted database and export your products, create a temporary category on the new database, reimport your converted database export items back into sample database, using the newly created category, loaded up and see what happens.

If you're still getting the same error, the possibilities are :

1. corrupt database values that did not convert properly
2. some setting likely CSS or a HTML tag, or even a JavaScript running inside the description or header fields located at the product level inside the database.

It's going to be interesting to see what the solution to this is?

I wish you the best of luck,
-Ray

Naveed Ashraf  
#15 Posted : Thursday, July 23, 2020 2:29:12 PM(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)
Quote:
Inner Exception: Specified cast is not valid.Inner Exception Stack Trace: at NHibernate.Impl.AbstractQueryImpl.UniqueResult[T]() at AbleCommerce.Controllers.ProductController.MoreCategoryItems



It seems some issue with the SQL query, or the data in database. Inside the action method there is only one query with UniqueResult call.
Code:

ISQLQuery query = NHibernateHelper.CreateSQLQuery(sqlquery);
                    query.SetParameter("categoryId", categoryId);
                    query.SetParameter("nodeType", CatalogNodeType.Product);
                    query.SetParameter("nodeId", productId);
                    query.SetParameter("visibilityId", (byte)CatalogVisibility.Public);
                    currentOrderBy = query.UniqueResult<int>();



I think that this website is upgraded from some older versions to AC9 or have some database customizations, as this issue is not there for fresh AC9 websites.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
judy at Web2Market  
#16 Posted : Wednesday, July 29, 2020 10:20:26 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I got a backup of the remote site and changed my local to use that database and now I had the same error on local. It errored out on
currentOrderBy = query.UniqueResult<int>()

I looked at ac_CatalogNodes table and had to change a couple of the datatypes to match the datatypes in the original AC 9 install. I had to change the OrderBy field to an int. I see in the upgrade script that it was supposed to be changed, but it wasn't.
ray22901031  
#17 Posted : Wednesday, July 29, 2020 11:03:49 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 909

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Changing database table data types manually is not a good thing. I am fairly new to Ablecommerce, but have a large background in database technology. Ablecommerce should provide and if they do not they must provide a separate tool just for the conversion of the database, and if the conversion fails they need to fix it.

I have yet to dwell into the inner linings of the AC9 database, but I know that changing datatypes could interfere with triggers, if they're being used, and table linking which will eventually affect SQL statements. I do not know how many orders you have, how many products you have, not to mention categories and the linking tables that support them.

But unless you have a successful database conversion, you going to have to export from the old database and reimport into a new AC9 fresh database, which of course is extremely time-consuming and your customer probably cannot afford the time necessary to do so. And that also may be problematic since I'm pretty sure primary database fields are being used for things like order ID, in order to maintain the same values, means removing primary keys and reactivating them, not a situation that I prefer to be in as this can affect linking structures.

Have you tried doing the conversion a second time?

I feel your pain,
-Ray
Naveed Ashraf  
#18 Posted : Wednesday, July 29, 2020 11:15:18 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)
Quote:

I looked at ac_CatalogNodes table and had to change a couple of the datatypes to match the datatypes in the original AC 9 install. I had to change the OrderBy field to an int. I see in the upgrade script that it was supposed to be changed, but it wasn't.


As I indicated earlier it turned out to be database upgrade issue. I am glad you figured it out.
Thanks for your support!
Naveed Ashraf
Ablecommerce.com
Developer Assistance Available
judy at Web2Market  
#19 Posted : Thursday, November 12, 2020 10:14:58 AM(UTC)
judy at Web2Market

Rank: Advanced Member

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

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Just an FYI- we just upgraded a site from Gold R12 to 9.0.3 and the OrderBy field in ac_CatalogNodes was still tinyint so I had to change to int
shaharyartiwana25816656  
#20 Posted : Thursday, November 12, 2020 11:11:21 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Just an FYI- we just upgraded a site from Gold R12 to 9.0.3 and the OrderBy field in ac_CatalogNodes was still tinyint so I had to change to int


I had upgraded a Gold R12 database to 9.0.3 just today. I can confirm that the OrderBy field in ac_CatalogNodes is int not tinyint.

Having said that, can you please confirm the datatype of OrderBy field before upgrading to AC9. I suspect the database being updated is old or is somehow customized.

Thanks
Users browsing this topic
Guest (3)
2 Pages12>
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.