Webstore: Product Paging Error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/7/2010 11:49:22 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Webstore: Product Paging Error

Hi Joe,

I was setting the new paging feature of Webstore released with version 2.3.4.1 and when I set a "Product List Page Size" value lower than the actual number of products in my store, the server gave me back the following error:

 

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

This constraint cannot be enabled as not all values have corresponding parent values.
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.ArgumentException: This constraint cannot be enabled as not all values have corresponding parent values.

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:


[ArgumentException: This constraint cannot be enabled as not all values have corresponding parent values.]
System.Data.ConstraintCollection.AddForeignKeyConstraint(ForeignKeyConstraint constraint) +3190393
System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign) +524
System.Data.DataSetRelationCollection.AddCore(DataRelation relation) +998
System.Data.DataRelationCollection.Add(DataRelation relation) +169
System.Data.DataRelationCollection.Add(String name, DataColumn parentColumn, DataColumn childColumn) +65
WebStore.Business.Store.GetProductPageWithOffers(Int32 pageNumber, Int32 pageSize, Int32& totalPages) +493
WebStore.UI.ProductListControl.BindProducts() +49
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Control.LoadRecursive() +191
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

 

I Hope this helps to find the issue.

Diego

4/8/2010 9:45:24 AM
Gravatar
Total Posts 18439

Re: Webstore: Product Paging Error

Hi Diego,

What version do you see for WebStore under Administration > System Information?

Thanks,

Joe

4/8/2010 9:48:56 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: Webstore: Product Paging Error

Joe,

Current version of webstore is 0.0.6.4

Ciao.
Diego

4/8/2010 9:54:32 AM
Gravatar
Total Posts 18439

Re: Webstore: Product Paging Error

Hi Diego,

I do not get this error on my local machine, perhaps it requires some specific conditions or product/offer settings.

Can you try to produce the error on demo.mojoportal.com? Then I could get clues to the conditions that cause the problem.

Thanks,

Joe

4/8/2010 10:39:38 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: Webstore: Product Paging Error

Hi Joe,

I have just completed the test on your demo site.

I have reproduced a simplified structure of my store: http://www.effectiveweb.it/web-store.aspx

  • 3 products (in my store they are 7)
  • Multiple offers for each one (in my store they are 1 to 6)

Then I set the page max to 2 products per page and everything works fine. I could not reproduce the error I get on my site when the number of products in list is higher of the page size value.

sad

4/10/2010 2:09:39 AM
Gravatar
Total Posts 28

Re: Webstore: Product Paging Error

Hi Joe, Hi Diego,

Win 2008 web server
MySQL
2.3.4.1

On my sites the same problem. On demonstration a site to play back a problem it is impossible, but the demo a site uses base MSSQL, and my sites work with base MySQL. The Reason in it can? I have checked up some sites, the problem is...

Specification
On a new site, (with MySQL), which it was developed at once from the version 2341 and in which the new store was created, the problem has not repeated. Probably problem not in MySQL.

4/10/2010 4:13:26 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: Webstore: Product Paging Error

My environment is:

Server: IIS 7 + MS SQL Server 2008

Client: Windows 7 + IE8
 

According to what Stas said, it seems not depending form the database platform (his MySQL and my MSSQL had the same problem). Stas' new site built fom V2.3.4.1 seams not affected, but we both faced the problem on upgraded sites.

My site was upgraded from previous version 2.3.3.9

4/10/2010 11:12:13 AM
Gravatar
Total Posts 28

Re: Webstore: Product Paging Error

I have found the reason and have played back a situation on a site demo.mojoportal.com. Problems arise, at change of values in fields "Primary Sort Rank" and "Secondary Sort Rank"
 

4/10/2010 1:05:47 PM
Gravatar
Total Posts 18439

Re: Webstore: Product Paging Error

Hi Stas,

Good work in finding the steps to produce the problem. I have fixed it in my copy and the fix will be in svn trunk by late tonight.

I sent Diego a script to alter a stored procedure which will fix it immediately for MS SQL. Unfortunately since the MySql sql statments are embedded in the WebStore.Data.dll, it will be fixed in the next release, I can't provide a script to fix it.

I will try to get a bug fix release out soon.

Thanks,

Joe

4/10/2010 1:41:55 PM
Gravatar
Total Posts 28

Re: Webstore: Product Paging Error

Perfectly, I will take with svn
Thanks,
Stas

4/10/2010 4:31:06 PM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: Webstore: Product Paging Error

The fix solved the issue.

Thanks Joe, Thanks Stas!

You must sign in to post in the forums. This thread is closed to new posts.