Page 1 of 1

Page Error in Opera Only

Posted: Mon Nov 24, 2008 11:06 am
by BryanWarmoth
I check our new live dev site today in Opera for the first time and was greeted with this error:
Server Error in '/' Application.

The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Users_ac_PageViews_FK1". The conflict occurred in database "AbleCommerce", table "dbo.ac_Users", column 'UserId'.

The statement has been terminated.
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.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Users_ac_PageViews_FK1". The conflict occurred in database "AbleCommerce", table "dbo.ac_Users", column 'UserId'.
The statement has been terminated.

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:

[SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "ac_Users_ac_PageViews_FK1". The conflict occurred in database "AbleCommerce", table "dbo.ac_Users", column 'UserId'.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteScalar() +137
Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteScalar(DbCommand command) +132
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteScalar(DbCommand command) +140
CommerceBuilder.Reporting.PageView.Save() +1178
CommerceBuilder.Services.AbleCommerceHttpModule.a(Object A_0, EventArgs A_1) +4840
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
I am only recieving this error in Opera (I went back and checked every other browser.) On a side note, another one of our developers went to the site and it worked but once he cleared his cache and cookies, he started to see the same error.

I went back and checked our internal development site and everything seems to work just fine in Opera. Has anyone else had this problem? I'm thinking that something went wrong with the installation at on our live server. Any ideas?

Here's our version info:
AbleCommerce:
VERSION: 7.0
BUILD: 10125

Opera 9.62
Win Server 2003
Sql Server 2005

Re: Page Error in Opera Only

Posted: Mon Nov 24, 2008 11:32 am
by mazhar
I have checked the final demo with Oepra 9.62 and it worked. Try to reproduce it here
https://demo.ablecommerce.com/ac7_stable/

Re: Page Error in Opera Only

Posted: Mon Nov 24, 2008 11:42 am
by BryanWarmoth
The demo site works just fine in Opera for me. I'm guessing we may have messed something up while we were installing AC7 up at our live server. Try going to http://dev.warmoth.com and let me know if your receive the same error in Opera. Any ideas why Opera would be the only browser causing the problem? Although less than 1% of our customers use Opera, I'm afraid this error may occur in other browsers later on.

Re: Page Error in Opera Only

Posted: Mon Nov 24, 2008 12:23 pm
by mazhar
Yes i am able to produce it on your webiste. It seems that you have customized the database.
Have a look at ac_PageViews table and modify the ac_Users_ac_PageViews_FK1 relationship. It sounds like you have Enforce Foreign Key Constraint value to yes, change it to NO and then give a try.

Re: Page Error in Opera Only

Posted: Mon Nov 24, 2008 1:51 pm
by BryanWarmoth
Ah.. that did the trick. Thanks for your help!