Error for Items with Product Attributes that do Price Adjustments

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Because I don't have a lot of products that have price adjustments through Product Attributes I didn't notice this until too late to go back.  It doesn't matter if the price adjustments are manual, or if they are caused by Associated products.  If the product has Product Attributes that do NOT have price adjustments there is no error.  

I upgraded from Version 3.8 to Version 3.9, and I'm 99% positive that the problem occurred after the upgrade.

When a customer goes to one of those products they get:

We're sorry, an internal error occurred.

Our supporting staff has been notified of this error and will address the issue shortly.

We apologize for the inconvenience.

Please try clicking your browsers 'back' button or try reloading the home page.

If you continue to receive this message, please try again in a little while.

Thank you for your patience.


The System log gives the following:


Log level Error
Short message Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Full message
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list. at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) at System.String.Format(String format, Object[] args) at Nop.Web.Framework.ViewEngines.Razor.WebViewPage`1.<get_T>b__3_0(String format, Object[] args) at ASP._Page_Views_Product__ProductAttributes_cshtml.Execute() in c:\inetpub\wwwroot\Views\Product\_ProductAttributes.cshtml:line 55 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.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at ASP._Page_Views_Product_ProductTemplate_Simple_cshtml.Execute() in c:\inetpub\wwwroot\Views\Product\ProductTemplate.Simple.cshtml:line 94 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.StartPage.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.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.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.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.<BeginProcessRequest>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.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Any help would be appreciated.

Sincerely,
Douglas Manning
5 years ago
Hi,

I agree that this issue is caused due to incorrect upgrade from 3.80 to 3.90. However, it would be good if you could upgrade again following proper steps to upgrade and test it locally.

Do you have any code or database schema related customization in your previous version?

Thank you,
Atul
5 years ago
Atul,

Thank you for your quick reply.  

No I do not have any custom code or data.

I did make some minor changes to the SQL Script do to errors in the Language pack.  

See Thread https://www.nopcommerce.com/boards/t/26102/language-pack-import-error.aspx

My problem though is I can't find my old working 3.8 version to do the update again from.  I might just have to export the data that I can and re-import it to a clean working site.  For the few things I can't export/import it will be some work, but I should be able to accomplish it in a day or less depending on other demands of my time.

Sincerely,
Doug
5 years ago
Hello Doug,

I think it would be good to create a fresh project setup and then import all the data that you have and check if error exists. I should solve your issue.

Thank you,
Atul
5 years ago
I was thinking that I would have to do that.  I will need to massage some of the data because you can't Export product attributes.  I will have to re-create the attributes then do a search/replace on the exported products.

I don't use Specification or Checkout attributes, but is there anything else someone can think of that I will have to do Manually for Product Information?  It looks like I will have to re-create customers and previous sales.  Product reviews will be easy because there arn't many.

Igh Just thought of a nightmarish one.  My Discount lists is long.  Many products that I have have a MAP (Minimum Advertised Price) and I use Discounts to get around that.  That will take a few days to sort out.  The more I look through the little things the more I realize this is not going to be quick :(.  Oh well
5 years ago
Ok, Started to do this.  Actually re-imported the data to a clean version of NopCommerce 3.9 and it was a complete mess.

Got lucky and found a 3.8 version that I had on an external drive I forgot about.  Re-did the update and everything seems to be working this time.  Very little has changed since that 3.8 backup I can re-create any data that has changed easily.

possibly some of the issues had been the problems when I did the update initially and had to run the SQL script a few times because of (https://www.nopcommerce.com/boards/t/26102/language-pack-import-error.aspx).  This time a I used my modified version of the SQL Script mentioned in that thread:

The top lines should look like this:
-- upgrade scripts from nopCommerce 3.8 to next version

SET QUOTED_IDENTIFIER ON
GO

Not sure if it was that or something else, and frankly at this time don't care.

Hell, maybe I will even try to upgrade to 4.0 again.  My problem is I'm running NopCommerce in Windows Server Core (Non-GUI), which makes the upgrades a bit more difficult.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.