SitecoreSidekick
SitecoreSidekick copied to clipboard
The "database" attribute on <root/> definitions does not work in v1.7
A colleague of mine pointed out that if you configure a root by specifiying a database:
<roots hint="raw:BuildRoot">
<root database="core">/sitecore/client</root>
</roots>
then Sidekick v1.7 is not able to expand this tree, preview or sync it.
Comparing the documentation in old blog posts to the current code, it looks like some heavy refactoring has happened which doesn't pass the "database" about when it hands item IDs and related data between methods and API calls. For example, these calls to fetch items from the database don't obey the database which the items came from. So unsurprisingly this will throw (often null reference exceptions) in the following code because items which do exists in one database can't be found in the default (master) db.