I get this DB Error on saving a new page programmatically:
"The INSERT statement conflicted with the FOREIGN KEY constraint \"FK_tblWorkContentProperty_tblContent\". The conflict occurred in database \"MyDbName\", table \"dbo.tblContent\", column 'pkID'."
The code which always worked is:
public static ContentReference SaveContentToPublishWithNoAccess(this IContentRepository contentRepository, IContent content)
{
return contentRepository.Save(content, SaveAction.Publish, AccessLevel.NoAccess);
}
What can be the reason? This happens only for one page that i am creating but i cannot see a difference to the others.
I have restarted IIS and cleared the trash. Since it's on local i can also debug.