Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules".The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules".
Previous
 
Next
New Post
7/19/2015 1:49 AM
 
I have noticed in my view logs numerous General Exceptions being generated in a short span of time, although I can not see any issue with the performance or the page load:

My installation is CE 7.4.1 on a Win2012 Standard with MSSQL 2012 webedition

 

AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:03a3c157-cbc4-43fe-9361-21b305e82143

AssemblyVersion:

PortalId:-1

UserId:-1

TabId:-1

RawUrl:

Referrer:

UserAgent:

ExceptionHash:m4d+kJZJIy+6FfBjZQlBJQ==

Message:The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules". The conflict occurred in database "MYDATABASE", table "dbo.Modules", column 'ModuleID'. The statement has been terminated.

StackTrace:

   at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at PetaPoco.Database.Execute(String sql, Object[] args)
   at DotNetNuke.Data.PetaPoco.PetaPocoHelper.ExecuteNonQuery(String connectionString, CommandType type, String sql, Object[] args)
   at DotNetNuke.Data.DataProvider.AddModuleSetting(Int32 moduleId, String settingName, String settingValue, Int32 createdByUserID)
   at DotNetNuke.Entities.Modules.ModuleController.UpdateModuleSettingInternal(Int32 moduleId, String settingName, String settingValue, Boolean updateVersion)

 

InnerMessage:

InnerStackTrace:


 

Source:.Net SqlClient Data Provider

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:

Server Name: MYSERVER

 
New Post
7/24/2015 1:12 AM
 

It seem to be that a third party script was causing the issue, I have posted the issue on codeplex:

http://dnnscript.codeplex.com/workite...

 
New Post
7/24/2015 7:19 AM
 
Salem, I'll have a look at it tomorrow, however, there shouldn't be a module Setting with an invalid ModuleID

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/25/2015 7:58 AM
 

this is weird, as TurboDNN explicitly recreates the foreign key constraint with cascading delete (from Modules to ModuleSettings), and no settings should be added without a valid ModuleID.

Does it happen on editing settings of any module?
Did you restart DNN after applying the script?


Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules".The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModuleSettings_Modules".


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out