Category links not working after upgrade from 1.9 to 2.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
We upgraded from version 1.9 to 2.0 and the category links no longer work. we kept on upgrading all the way to 2.2 and it didn't fix the issue. We rolled back to 1.9, everything worked great, did a new upgrade and the same thing happened.

Product pages still work after the upgrade, so it doesn't seem to be a URL re-write issue.

Right now we have two sites running, version 1.9 and version 2.0

In the Version 1.9 site, the category links work:
  http://www.MikesOffRoad.com

After upgrading to Version 2.0, category links do not work:
  http://nopc2.MikesOffRoad.com

Product pages do work in the Version 2.0 site:
  http://nopc2.mikesoffroad.com/p/20829/superwinch-talon-125-12500-lbs12v
12 years ago
You're getting a generic error ("We're sorry, an internal error occurred that prevents the request to complete"):

To find out what went wrong you need to turn off the custom errors mode.
1. Open web.config file
2. Find out the following line <customErrors defaultRedirect="errorpage.htm" mode="RemoteOnly">
3. Replace it with <customErrors defaultRedirect="errorpage.htm" mode="Off">
12 years ago
Here's the error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Attempted to divide by zero.
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.DivideByZeroException: Attempted to divide by zero.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[DivideByZeroException: Attempted to divide by zero.]
   Nop.Core.PagedList`1..ctor(IQueryable`1 source, Int32 pageIndex, Int32 pageSize) in F:\Own\NopCommerce\Sources\src\Libraries\Nop.Core\PagedList.cs:22
   Nop.Services.Catalog.ProductService.SearchProducts(Int32 categoryId, Int32 manufacturerId, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 relatedToProductId, Int32 productTagId, String keywords, Boolean searchDescriptions, Int32 languageId, IList`1 filteredSpecs, ProductSortingEnum orderBy, Int32 pageIndex, Int32 pageSize, Boolean showHidden) in F:\Own\NopCommerce\Sources\src\Libraries\Nop.Services\Catalog\ProductService.cs:350
   Nop.Web.Controllers.CatalogController.Category(Int32 categoryId, CatalogPagingFilteringModel command) in F:\Own\NopCommerce\Sources\src\Presentation\Nop.Web\Controllers\CatalogController.cs:785
   lambda_method(Closure , ControllerBase , Object[] ) +150
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8897857
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
12 years ago
https://www.nopcommerce.com/boards/t/12715/attempted-to-divide-by-zero.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.