Recently I had problems with a site I have created using umbraco. The problem was that for some reason in the version control of the application there were many orphan versions that where visible on the cmsContentVersion table but not on the cmsDocument. You can find those using the query below:
SELECT * FROM cmsContentVersion WHERE cmsContentVersion.VersionId NOT IN (SELECT VersionId FROM cmsDocument) AND cmsContentVersion.ContentId IN (SELECT nodeId FROM cmsDocument)
Deleting those record fixed my problem and the problematic nodes where shown again in both the content tree view and edit view in umbraco CMS. To delete those versions in your database use the code below:
DELETE FROM cmsContentVersion WHERE cmsContentVersion.VersionId NOT IN (SELECT VersionId FROM cmsDocument) AND cmsContentVersion.ContentId IN (SELECT nodeId FROM cmsDocument)
Leave a Reply