I have migrated a site from 2007 to 2010. I then moved the site collection to a place within a subsite using site content and structure.
Everything works fine and I can see everything correctly.
Now I'm creating a timer job and I'm looking for the site collection but it can't find it!
I've used PowerShell and it does return the site, I've looked within the content database and it is also present! I presume that PowerShell is getting it from the content database?
But when doing it through code it doesn't find the site collection!
I'm iterating through webapplication -> then all sites and then all webs, but it doesn't show up.
I've also directly called site using parent id/url and also tried calling the site collection via GUID and url but no luck!
Am I missing something?
How can I update the UI to reflect what is on the content database? Why doesn't SPSite/SPWeb find the site that exists?