Issue while adding Umbraco form in Uskinned components
Hello,
I am experiencing an issue with my Uskinned in Umbraco setup where I encounter a UNIQUE KEY constraint violation on the umbracoRelation table. The error message is as follows:
I have checked the umbracoRelation table and found that there are already two records with the following details:
SELECT * FROM umbracoRelation WHERE parentId = 6367 AND childId = 6365 AND relationType = 6;
One record with relType = 4 and another record with relType = 6
It seems like the system is trying to insert a duplicate key for the relation type 6.
I got the issue while adding Umbraco form inside a Uskinned component.
I've investigated the UNIQUE KEY constraint violation on the umbracoRelation table you're encountering while adding an Umbraco form with uSkinned components. The only workaround I've found is to remove the constraint.
While dropping the constraint can indeed resolve the issue, I recommend proceeding with caution. This approach bypasses the immediate problem but may introduce potential data integrity challenges in the future.
If this solution is necessary for your project to proceed, ensure you have a good backup and consider implementing additional checks or processes to maintain data integrity. If a better solution becomes available or if Umbraco provides a fix in a future update, it would be wise to revisit this modification.
There might be someone else who experienced the same or might have to look into the code as to why it's not doing an update instead of inserting a new row.
Here are the SQL commands to drop and optionally re-add the constraint:
-- Dropping the constraint
ALTER TABLE [umbracoRelation]
DROP CONSTRAINT [IX_umbracoRelation_parentChildType];
-- Re-adding the constraint if needed
ALTER TABLE [umbracoRelation]
ADD CONSTRAINT [IX_umbracoRelation_parentChildType]
UNIQUE NONCLUSTERED ([parentId], [childId], [relType]);
Issue while adding Umbraco form in Uskinned components
Hello,
I am experiencing an issue with my Uskinned in Umbraco setup where I encounter a UNIQUE KEY constraint violation on the umbracoRelation table. The error message is as follows:
I have checked the umbracoRelation table and found that there are already two records with the following details:
SELECT * FROM umbracoRelation WHERE parentId = 6367 AND childId = 6365 AND relationType = 6;
One record with relType = 4 and another record with relType = 6
It seems like the system is trying to insert a duplicate key for the relation type 6.
I got the issue while adding Umbraco form inside a Uskinned component.
Umbraco version is 12.3.10
Umbraco Forms: 12.2.2
Uskinned: 5.2.0
How can I resolve this issue?
I've investigated the UNIQUE KEY constraint violation on the umbracoRelation table you're encountering while adding an Umbraco form with uSkinned components. The only workaround I've found is to remove the constraint.
While dropping the constraint can indeed resolve the issue, I recommend proceeding with caution. This approach bypasses the immediate problem but may introduce potential data integrity challenges in the future.
If this solution is necessary for your project to proceed, ensure you have a good backup and consider implementing additional checks or processes to maintain data integrity. If a better solution becomes available or if Umbraco provides a fix in a future update, it would be wise to revisit this modification.
There might be someone else who experienced the same or might have to look into the code as to why it's not doing an update instead of inserting a new row.
Here are the SQL commands to drop and optionally re-add the constraint:
There is no update available for Umbraco 12 regarding this issue. However, it has already been fixed in Umbraco 13.
The current way is to add the following workaround to the appsettings or upgrade to 13.
is working on a reply...