Try our conversational search powered by Generative AI!

Exception thrown when creating a Block


Hello there, I ran into a problem when trying to create a Block of a certain type.

The exception in my log file is as follows:

2018-09-26 12:47:39.683 +02:00 [Error] Unhandled exception in Website, ExceptionContext: { Url: "", UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36", Method: "POST", StatusCode: 200, Machine: "DESKTOP-5KUFAB8", TrackingCode: "S4CG3" }
System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_tblContent_tblContentType". The conflict occurred in database "Waternet_Global_Epi_Dev", table "dbo.tblContentType", column 'pkID'.

I see the ContentType in the admin view, however, when trying to edit it's settings and saving it, it gives the message, ContentType Deleted, after that it's nowhere to be found anymore. Is there any way this is fixable in the database itself?

Thanks in advance!

Sep 26, 2018 12:59

Just guessing, but could it be that GUID on the block model is copied from another one. Duplicate GUID will mess things up, at least it did in older versions.

Are you able to edit blocks created with other block type?

Can you also supply your Episerver version please.

Edited, Sep 26, 2018 14:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.