HomeHome Product Discus... Product Discus...SmithCartSmithCartSmith Shopping Cart bug after shipping step [resolved]Smith Shopping Cart bug after shipping step [resolved]
Previous
 
Next
New Post
9/1/2011 4:00 AM
 

Hi,

 

I am currently testing your cart module (on a local DNN test site) and I faced an error stating "Index was outside the bounds of the array". The error occurs when clicking the "NEXT" button after having entered shipping info (the buynow page is displayed showing the error message).

The error detail shown in the Event Viewer are :

AssemblyVersion: 6.0.1

PortalID: 0

PortalName: My Website

UserID: 2

UserName: admin

ActiveTabID: 88

ActiveTabName: Smith Store

RawURL: /SmithStore/tabid/88/ctl/Confirm/mid/439/Default.aspx

AbsoluteURL: /Default.aspx

AbsoluteURLReferrer: http://localhost:6882/SmithStore/tabid/88/ctl/step1/mid/439/Default.aspx

UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider

ExceptionGUID: a020eda0-a92d-4b95-9dae-7fad9963f849

InnerException: Index was outside the bounds of the array.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: Smith.DNN.Modules.BuyNow.Confirm.SetCustomerInfo

StackTrace:

Message: DotNetNuke.Services.Exceptions.PageLoadException: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Smith.DNN.Modules.BuyNow.Confirm.SetCustomerInfo() at Smith.DNN.Modules.BuyNow.Confirm.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Source:

Server Name: WIN-78TGVRRCBE0

 

Here are my DNN installation info:

DotNetNuke Product: DotNetNuke Community Edition

DotNetNuke Version: 06.00.01 (310)

Running on IIS 7 installed on a Windows 7 64bits edition.

 

How can I fix this error ?

 

 

Note that an other error occurs when clicking the "CHANGE" button on the cart view : "A critical error has occurred. Index was outside the bounds of the array. ". Here is the stack trace :

AssemblyVersion: 6.0.1

PortalID: 0

PortalName: My Website

UserID: 1

UserName: host

ActiveTabID: 88

ActiveTabName: Smith Store

RawURL: /SmithStore/tabid/88/ctl/Cart/mid/439/Default.aspx

AbsoluteURL: /Default.aspx

AbsoluteURLReferrer: http://localhost:6882/SmithStore/tabid/88/ctl/Cart/mid/439/Default.aspx

UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)

DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider

ExceptionGUID: 6fdfd020-235f-41e8-be53-e63ec4cda003

InnerException: Index was outside the bounds of the array.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: Smith.DNN.Modules.BuyNow.Cart.btlInvoiceChange_Click

StackTrace:

Message: DotNetNuke.Services.Exceptions.PageLoadException: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Smith.DNN.Modules.BuyNow.Cart.btlInvoiceChange_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

Source:

Server Name: WIN-78TGVRRCBE0

 

 
New Post
9/1/2011 2:51 PM
 
Hi Rico,

Which version of the Cart are you running? Which Payment Gateway are you using? How is your Shipping and Handling Setup section configured? Did you import your product data?

Thanks,
 
New Post
9/2/2011 3:21 AM
 
Hi Kevin and thanks for considering my request.

Sorry, I missed some usefull information.

Which version of the Cart are you running? 4.52.0 (no license key as we are evaluating the product)
Which Payment Gateway are you using? Paypal Website Payments Standard in Test mode (Sandbox), only credit card accepted
How is your Shipping and Handling Setup section configured? Free Shipping and No Handling Setup
No product imported, just 2 test products created

Hoping you can help me fix this error.
 
New Post
9/2/2011 3:37 PM
 
Hi Rico,

I have not been able to replicate this issue with the same settings you have specified above. How do you have your settings configured in the Cart Settings under the General Cart Setup section and also under the Step 1 Checkout Setup section? If you could post a screenshot of your Cart Settings would be helpful or you are welcome to login to our test site http://www7.smith-consulting.com/ and try to replicate the error. This will determine if the issue is with the latest version of the cart or an issue with your specific dnn portal/cart install.

Please send an email to kevin@smith-consulting.com if you need a login.

Thanks,
 
New Post
9/6/2011 9:30 AM
 
Hi Kevin,

Unfortunately, I was not able to reproduce the bug in your test site. However, I have noticed some difference when displaying the cart content : on the cart page bottom, the user informations can be edited on your test site (and the bottom button is 'CONFIRM'), whereas it cannot be edited on my website (and the bottom button is 'CHANGE', which causes a bug when clicked [see second part of the first post]). The other difference is that on my site, there is no 'Shipping method' to select.

I have installed an other DNN test website and the bug I described above did not happened. I have checked the two test site parameters for the Smith Shopping Cart module and they seems to be the same (unless I am missing something).
The only difference between the 2 sites is that the first (which contains the Checkout bug) is using a SQL Express (10.0.4000, the SQL Express edition that comes with the Microsoft automated install using Web Matrix) attached database [not a dynamically attached file], whereas the second uses a SQL Server (10.50.1600) attached database.
The connection credentials used for the SQLExpress database connection is 'IIS APPPOOL\dotnetnuke' with the dbOwner role and the 'sa' login (mixed mode authentication) is used for the SQL Server database connection.

Note that the website that uses the SQL Server database (which is not buggy) displays editable field (with the 'CONFIRM' button) in the cart page like in your test site (but it do not dislay the 'Shipping method' field as I have added only digital products).


Thanks for your support.


NB: transmitted a screenshot of Store & Checkout Step 1 setup (regrouped in 1 image) as attachment
 
 Login to download attachment
New Post
9/6/2011 3:04 PM
 
Hi Rico,

We are glad to hear that you now have an issue free store. Not sure if you had configured both SQL Express and SQL Server the same but please see the following link which which outlines setting up both SQL studios: http://www.dotnetnuke.com/Resources/Wiki/page/Install_DotNetNuke.aspx

Thanks,
 
New Post
9/7/2011 4:19 AM
 

Hi Kevin,

 

Maybe it is an issue free store but the bug occurs in your module, so it prevents us to use it (but we want to continue to investigate as it seems to be a great shopping module).

However, I have done some more testing and found some interresting conclusions. Note that all the following tests are made using the sa account in the web.config connection strings definition.

1) I have installed a other SQLExpress instance 'by-hand' (ie not using the automated install from Microsoft's Web Paltform Installer), attached the SQLExpress database (that is used by the buggy site), changed the web.config to use the newly installed SQLExpress instance and the bug still happens.

 

2) I made database files copy and attached the duplicated database in the other SQL instance, i.e. I have attached the SQLExpress database to the SQLServer instance and the SQLServer database to the SQLExpress instance (and changed web.config files on both sites to use the other SQL instance).

When testing the Smith Shopping Cart modules on Dotnetnuke test sites, the site that have the SQLServer attached database (the database that was formerly attached to the SQLExpress instance) has the bug, whereas the site with the SQLExpress attached database (that was formerly attached to the SQLServer instance and that do not produced the bug) do not have the bug.

 

3) I have done one more test: I have attached the SQLExpress database (used by the site that have the bug) to the SQL Server instance (like above), but I told the site that do not produce the bug to use it (reported the web.config machineKey settings to be able to login). As a result the bug have been reproduced.

 

So it seems that the bug is not related to a SQL Server configuration issue but something that was set in the database before the checkout process is initiated (maybe the Smith Shopping Cart installation slightely differs (or do not initialize things in the same way) when using SQL express or SQL Server ?) as the site using the database created in SQL Express will have the bug when the database is attached to a SQL Server instance and the site without the bug will produce the bug when using the SQLExpress database.

 

Hope I have been clear enough...

I can give you credentials for the buggy test site in order that you can reproduce yourself the problem (just email me) or maybe I can transmit you my entire test site.

 

 

 

 

 

 
New Post
9/7/2011 5:55 AM
 

 

You might think I'm nuts here, but I find it a strange coincidence that:
 
Rico is getting a shipping related error like this:
System.IndexOutOfRangeException: Index was outside the bounds of the array. at Smith.DNN.Modules.BuyNow.Confirm.SetCustomerInfo()
 
And I am getting and email related error like this:
Error : Index was outside the bounds of the array at Smith.DNN.Modules.BuyNow.SCMail.SendMail(Int32 buyNowTabModuleID, CustomerInfo customer, StoreOrdersInfo order, BillingAccountInfo account, EmailLabelInfo ei, BuyNowSettingsInfo bi, UserInfo ui, InvoiceToInfo invoiceInfo, String emailType) at Smith.DNN.Modules.BuyNow.ManageOrderDetail.SendMail(String emailType)
 
And thirdly after setting up the shipping on your www21 test portal similarly to my portal, I was able to generate this:
Error : Object reference not set to an instance of an object at Smith.DNN.Modules.BuyNow.Confirm.SendEmail(CustomerInfo customer, UserInfo objUserInfo)
 
The customerinfo class is used in a number of places which could be the reason for  few unpredictable unsovled exceptions at present.
 
New Post
9/7/2011 8:21 AM
 

Hi Daniel and thanks for pointing me that the bug is related to the customer data (as I suspected since the stack trace shows that the error is occuring in the SetCustomerInfo method).

 

However, I reinstalled a clean Dotnetnuke website (with the Smith Shopping Cart module) using a just installed SQLExpress instance and the problem disappeared. So I suspect that the problem comes from :

- Microsoft automated install (from Web Platform Installer) (but have not tried the automated install again - maybe when I will get more time),

- Some other shopping cart modules installed alongside the Smith module on the Dotnetnuke website installed trought Web Platform Installer (the new webSite that do not produce the bug has only the Smith module installed.

I will consider the bug is related to a very specific installation and is not easily reproducible.

 

Thanks again for your support.

 
New Post
9/7/2011 4:58 PM
 
Hi Rico,

Not sure exactly what the issue is with your site was but it sounds like it could have been something in your environment hosting or server setup or maybe something with the cart install had gotten out of the sync or possibly a conflict with the configuration on you site. Without replicating the issue on our test portal, I am unable to troubleshoot further.

Thanks,

 
New Post
9/8/2011 5:03 AM
 

Hi Kevin,

 

I have found was caused the bug: when clicking to the 'View cart' button, if the user (or the anonymous user) have not filled the Country field, he can continue the checkout process. After having filled all necessary fileds in the Shipping step, clicking on the 'NEXT' button will cause the 'Index was outside the bounds of the array.' error.

 

Moreover, when the user returns on the 'View Cart' page after the above error occurs, the profile fields are not enabled. Clicking on the 'CHANGE' button will cause the second error described in my first post. So from this point, the user cannot place any order as he cannot fill profile informations anymore.

 

Note that if the Country field has been filled once, the bug do not occurs anymore as the country is always set for next orders.

 

Steps to try to reproduce the bug:

Restart the webSite (using IIS) untill no more items are into the cart for the anonymous user (not logged-in)

Add something into the cart

Click 'View cart'

DO NOT select any country in the drop-down list (Value must be '-Select Country-', see below image), just click 'Procced to checkout'. If there is already a country please restart the entire procedure (restart IIS...)

Fill-in shipping info and click 'Next'

The bug occurs

 

Note:

- I tested with the last available Smith Shopping Cart version, ie 4.58.

- The bug cannot be reproduce on your test site (http://www7.smith-consulting.com) as the 'South Africa' country is already selected for anonymous user in the View cart page.

- The official demo site (http://www12.smith-consulting.com) does not have the profile info on the View cart page. How can I hide them ?

 

Hope you will be able to reproduce the bug this time.

 

 
New Post
9/8/2011 1:36 PM
 
Hi Rico,

I'm sorry but I am still unable to reproduce this issue on our test portal as I am unable to proceed to the next step of the checkout process as the Country field is required to be entered before proceeding to the next step and the field will also be automatically populated by the Country which is set in the Cart Settings. In you Cart Settings in the General Store Setup section do you have a Country set for your store? Can you login to our test site http://www7.smith-consulting.com/ and try to replicate the error. This will determine if the issue is with the latest version of the cart or an issue with your specific dnn portal/cart install.

Please send an email to kevin@smith-consulting.com if you need a login.

Thanks,
 
New Post
9/9/2011 2:54 AM
 

Hi Kevin,

 

[Leave above fields empty at this step to cause the bug after the shippng step]

The image shown above is a screenshot of my 'View Cart' page for an anonymous user. When clicking on 'PROCEED TO CHECKOUT', the shipping step is shown without any error message. At the shipping step, fields are mandatory to proceed to next step (but not on the step shown above). The bug occurs when clciking the 'NEXT' button of the shipping step.

On your demo site, there is already a value, so you cannot 'deselect' the country.

If you succeed to remove the selected country, I am surprised that you tell me you cannot go to shipping step from the step above as I can on my dnn test site...

 

In you Cart Settings in the General Store Setup section do you have a Country set for your store?

In the general store setup, All fields (but the Google Analytics ID one) have been filled (Country set to France).

 

Can you login to our test site http://www7.smith-consulting.com/ and try to replicate the error

As I state in my last post: "- The bug cannot be reproduce on your test site (http://www7.smith-consulting.com) as the 'South Africa' country is already selected for anonymous user in the View cart page." (I think the web server must be restarted until the country field becomes blank (or "-Select Country-").

 

And at last, you do not have answered to my question:

- The official demo site (http://www12.smith-consulting.com) does not have the profile info on the View cart page. How can I hide them ?

 

Thanks anyway.

 

Note: the above screenshot differs from the screenshot of my preceeding post (fields are not directly editable, I have to click to the 'CHANGE' button, whereas the other screenshot has editable fields with a 'CONFIRM' button). What causes this behaviour difference ?

 
New Post
9/9/2011 1:56 PM
 
Hi Rico,

How do you have your Shipping and Handling setup in your Cart Settings? On our test portal, after adding and item to the Cart the anonymous user will not be able to proceed to the next step as the First Name, Last Name, Address, Country, and Shipping Method are all required fields.

When the Country has been set in the Cart Settings, it will be automatically populated in the Country field on the Cart screen. It would not be a typical scenario for the web server to be restarted to make the Country field blank before an anonymous user purchases a product.

The reason the Ship To fields are not shown on the www12 Demo Site is the Shipping has been set to Ship By Order Amount which allows the following:

Fixed shipping costs by the total order amount
Fixed shipping costs by shipping method and order amount.
Fixed shipping costs by product category and order amount.

Thanks,
 
New Post
9/14/2011 8:07 AM
 

Hi Kevin.

 

How do you have your Shipping and Handling setup in your Cart Settings? => Free Shipping, no Handling setup

I have verified that on your test portal, we cannot go to the checkout step without filling some fields. But on my test site, I can (why this behaviour difference ? Are we using the same extension, ie Smith Shopping Cart 4.58 ?). Note that if we proceed to Shipping step without having populated the country in the Ship To step, the Shipping country field is populated with the store country (so this is the Shipping country field that is populated automatically with the store country, not the Cart view (Ship To) country; as you stated in "When the Country has been set in the Cart Settings, it will be automatically populated in the Country field on the Cart screen").

 

Country in the Cart settings (in General Store Setup) has been set to France, but the Country field is not automatically populated (just tested for an anonymous user without having to restart IIS - restarting IIS is just a way to reproduce the bug (to reproduce the initial webSite state)).

 

I have tried to set the Shipping to Ship By Order Amount but the "Ship To" fields are still shown in the Cart view page (and note that my cart module has not the "Ship To" title, it shows just a grey band. It has no "Shipping Method" as well). I have noticed that the Ship To fields visibility depends on the bought product: is there some configuration to do a the product level the hide the Ship To fields ?

 

At last you did not tell me why there is 2 differents Cart view display : one with directly editable Ship To fields, and one with a "change" button to make the fields editable.

 

Note that I have found some errors in your demo site (I will create an other thread for that). Maybe there are related to the error described in this post.

 

Hope you will be able to reporoduce this bug as I cannot deploy the Smith extension untill this has been fixed...

 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartSmith Shopping Cart bug after shipping step [resolved]Smith Shopping Cart bug after shipping step [resolved]