Sitecore Rainbow Logo

Getting a "No trees contained the global path" when creating an item using Unicorn in Sitecore

Posted 02/12/2016 by Ed Kapuscinski

I've been doing a bunch of hacking on Sitecore habitat solutions lately (I blame the Sitecore Hackathon).

The other day I came across a somewhat cryptic error message from Rainbow (the engine that Unicorn uses to serialize Sitecore content items):  "No trees contained the global path" .

I was creating an item directly under /sitecore/content to setup a new site. 

I couldn't find anything online about solving the problem, so I decided to share my fix. 

It turns out that the error popped up because I had two different Unicorn predicates (the configurations that control what items get serialized) pointing to the same location (that was where I was trying to create an item). 

In my case, this happened because I had renamed a config after publishing it to the webroot. Because of the way Visual Studio publishes, the old version remained in the site's app_config/include folder, meaning there were two conflicting configs.

To solve the issue, I simply deleted the offending old, pre-rename, config file.

This issue might also pop up in other cases though, but the resolutions should likely be the same.

Share:

Archive

Syndication