2

I'm trying to install Habitat the first time under the instruction from the Habitat Wiki page. I've installed the correct version of the instance and WFFM module, and also have the MongoDB running.

However, when running gulp, I've encountered an error that none of the unicorn files is synced. Log:

[17:20:36] Finished '04-Apply-Xml-Transform' after 1.57 s
[17:20:36] Starting '05-Sync-Unicorn'...
Sync-Unicorn: Executing Sync...


Sync Unicorn






Foundation.Serialization is being synced.


Unable to resolve serialized item for included root path master:/sitecore/system/Settings/Feature. The item does not exist in Serialization File System Data Store. It has been skipped. Perhaps you need to perform an initial serialization from the control panel?


Unable to resolve serialized item for included root path master:/sitecore/system/Settings/Foundation. The item does not exist in Serialization File System Data Store. It has been skipped. Perhaps you need to perform an initial serialization from the control panel?


Unable to resolve serialized item for included root path master:/sitecore/system/Settings/Project. The item does not exist in Serialization File System Data Store. It has been skipped. Perhaps you need to perform an initial serialization from the control panel?

....similar messages...

Project.Habitat.Website had no root paths included to sync. If you're only syncing roles, this is expected. Otherwise it indicates that your predicate has no included items and you need to add some.


Project.Habitat.Website sync complete: 0 items evaluated, 0 items modified (0 added, 0 updated, 0 recycled) in 4ms (~4.51ms/item).






Project.Habitat.Website roles are being synced.


Project.Habitat.Website role sync complete.




Project.Habitat.Website users are being synced.


Project.Habitat.Website user sync complete.






Completed in 290ms.


****ERROR OCCURRED****


Error: Unicorn Sync to http://habitat.dev.local/unicorn.aspx?verb=Sync&configuration=&skipTransparentConfigs=0 returned an error. 
See the preceding log for details.

Error: At C:\Users\Ben\Projects\Habitat\scripts\Unicorn\Unicorn.psm1:66 char:3
+         throw "Unicorn $Verb to $url returned an error. See the prece ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unicorn Sync to...og for details.:String) [], RuntimeException
    + FullyQualifiedErrorId : Unicorn Sync to http://habitat.dev.local/unicorn.aspx?verb=Sync&configuration=&skipTransparent 
   Configs=0 returned an error. See the preceding log for details.

It seems like there are no .yml file to be synced. I've checked the "Data\Unicorn\Unicorn.Users" folder and all folders are empty.

Can anyone help? Thanks :).

1
  • The serialized files are stored alongside each project, in the Serialization folder. The files for Foundation.Serialization will be in /Foundation/Serialization/serialization/, for example. Try confirming they are there, then go to the Unicorn Control Panel and look at the configurations to confirm the file paths it is using are correct - habitat.dev.local/unicorn.aspx
    – Kasaku
    Commented Nov 10, 2017 at 7:50

2 Answers 2

3

This line in the z.Habitat.DevSettings config file, tells Unicorn where your serialization yml files are. Please make sure that the path is correct to the src folder of your github files.

Just so I don't have a link answer, the line in question is the variable sourceFolder in the xml below.

Also make sure this file is located at /App_Config/Include/Project/z.Habitat.DevSettings.config in your website.

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sc.variable name="sourceFolder" value="C:\projects\Habitat\src" />
    <sc.variable name="rootHostName" value="dev.local" />

    <sites>
      <site name="habitat">
        <patch:attribute name="database">master</patch:attribute>
      </site>
    </sites>
    <settings>
      <setting name="Sitecore.Foundation.Installer.RestoreMongo" value="false"/>
    </settings>
  </sitecore>
</configuration>
1
  • Thanks for the answer. Just found out that I missed typed the path. Commented Nov 12, 2017 at 22:47
0

You need to set up Unicorn configurations. In this configuration you indicate from what paths from Sitecore to sync, and you also define the destination path on disk. Just create a config file. In the example is my Unicorn.Configs.CommonTemplates.config. I use this config for deployment targets, for debug I have a transformation serializing items to a place that's in version control.

Example:

   <?xml version="1.0"?> <!-- For more information on using app.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->



 <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">  
   <sitecore>
        <unicorn>
          <configurations>
            <configuration name="CommonTemplates" description="Sitecore Unicorn configuration for Common Templates">
              <targetDataStore physicalRootPath="/App_Data/sitecore_items/$(configurationName)" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
              <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
                <include name="Common Templates" database="master" path="/sitecore/templates/User Defined/Common" />
              </predicate>
              <dataProviderConfiguration enableTransparentSync="false" type="Unicorn.Data.DataProvider.DefaultUnicornDataProviderConfiguration, Unicorn" singleInstance="true" />
              <syncConfiguration updateLinkDatabase="false" updateSearchIndex="false" maxConcurrency="1" type="Unicorn.Loader.DefaultSyncConfiguration, Unicorn" singleInstance="true" />
            </configuration>
          </configurations>
        </unicorn>   
    </sitecore>
  </configuration>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.