Error FK_tblContentSoftlink_tblPropertyDefinition in CMS
Example Error :
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.
Comments