Cannot rename old site on restore
While restoring a site i got the following error "Cannot rename old site on restore"
Analysis
There was an issue with the site content types and site columns which were causing an error in an internal SharePoint stored Procedure "RenameSite".
As during the execution of the stored Procedure "RenameSite" there was an if statement that looks for the content types and site columns
in this case 0 result was returning to the stored procedure .
Fix
Fix the issue of the missing content types by deactivating and activating the content types
stsadm -o deactivatefeature -name Fields -url <<siteurl>>
stsadm -o activatefeature -name Fields -url<<siteurl>>
Fix the issue of the missing content types by deactivating and activating the site columns
stsadm -o deactivatefeature -name ctypes -url<siteurl>>
stsadm -o activatefeature -name ctypes -url<siteurl>>