Vinit Gavankar
Aug 20, 2026
visibility 22
star star star star star
(0 votes)

Error FK_tblContentSoftlink_tblPropertyDefinition in CMS

Example Error :

 Microsoft.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_tblContentSoftlink_tblPropertyDefinition". The conflict occurred in database "XYZ-epicms", table "dbo.tblContentSoftlink", column 'fkOwnerPropertyDefinitionID'.

 

Description:

This is happening because you’re attempting to remove a property definition, and during model sync on initialization, it tries to delete that row from tblPropertyDefinition. However, there are still rows in tblContentSoftlink that reference this property definition.
 
First, I will ask you to try "Restart one instance at a time" from the "Troubleshoot" tab of the PAAS Portal and check again.
 
If the issue continues, this query will give you all property definitions that have rows in tblContentSoftlink, along with their property definition type:

SELECT *
FROM tblPropertyDefinition pd
INNER JOIN tblPropertyDefinitionType pdtype
ON pdtype.pkid = pd.fkPropertyDefinitionTypeID
WHERE EXISTS (
SELECT 1
FROM tblContentSoftlink cs
WHERE cs.fkOwnerPropertyDefinitionID = pd.pkid
);

Once you know the property definition to remove, you can delete the dependent softlink rows first (replace X with the pkid of the property definition):

DELETE FROM tblContentSoftlink
WHERE fkOwnerPropertyDefinitionID = X;

 
After that, the modelsync should be able to remove the property definition.
 
I’d recommend testing this locally first, using a copy of the preproduction database, to ensure it behaves as expected.

Aug 20, 2026

Comments

error Please login to comment.
Latest blogs
Get count of pages, blocks , Assets from the CMS.

The following queries retrieve details from the CMS database. Make sure to try these queries locally first.    Step 1 — Discover your content type...

Vinit Gavankar | Aug 20, 2026

Optimizely CMP Login Failure After Enabling SSO – The Certificate Mismatch That Locked Everyone Out

Recently, our team faced a production issue where users suddenly lost access to Optimizely CMP, Opti ID Admin Center, and the Optimizely Support...

Madhu | Aug 19, 2026 |

Upgrade Optimizely CMS 12 to .NET 10

If you are still running CMS 12 on .NET 8, it's time to upgrade!

Tomas Hensrud Gulla | Aug 17, 2026 |