Archives / 2017 / June
  • sitecore - one click publish for web projects

    With the Helix application structure of sitecore projects there are a lot of web projects. If you follow the Habitat tooling there is a set of convenient gulp tasks for publishing changes like the "do it all" gulp default task. In most cases publishing the web project you made your changes in is enough. In most cases this is a feature or foundation project. You can do this by right-clicking on the web project, select Publish..., and press the Publish button in the resulting screen. A faster way is to enable the Views > Toolbars > Web One Click Publish option so you get a button on your toolbar for fast publication.

  • sitecore Habitat - TypeError: Cannot read property '0' of undefined

    When you get the error TypeError: Cannot read property '0' of undefined in the Gulp task '05-Sync-Unicorn' you probably don't have a SharedSecret configured in the file C:\Projects\Habitat\src\Project\Habitat\code\App_Config\Include\Unicorn\Unicorn.UI.config.

    In my project the SharedSecret wat commented out, i.e.:

    <!--<SharedSecret></SharedSecret> Uncomment this line and provide a strong randomized shared secret here. At least 64 characters is recommended, for example -->

    I followed the instructions, uncommented it, grabbed a 64 characters password from so my line read:


    I did run gulp 05-Sync-Unicorn again, but still the same error. 

    After adding a line to the script C:\Projects\Habitat\scripts\unicorn.js:

    console.log("Reading Unicorn configuration file " + unicornConfigFile);
    var data = fs.readFileSync(unicornConfigFile);
    I saw my problem:
    The script is reading from the deployed website location ( C:\websites\\Website/App_config/Include/Unicorn/Unicorn.UI.config), not the project location (C:\Projects\Habitat\src\Project\Habitat\code\App_Config\Include\Unicorn\Unicorn.UI.config). 
    I could run the complete gulp default task again, but doing a Publish... on the Sitecore.Habitat.Website project (right-click on the project) does the job much quicker.
    After publishing, re-execute step 5 again: gulp 05-Sync-Unicorn
    Hint for the sitecore team: reading a configuration setting using the line:
    secret = result.configuration.sitecore[0].unicorn[0].authenticationProvider[0].SharedSecret[0];
    from a configuration file where this setting is commented out will lead to issues that take people a lot of time to find out, especially because I couldn't find anything on this on the Wiki documentation of the Habitat project.
  • sitecore SIM - backup installation as restore point

    After doing a fresh install of a sitecore site through the sitecore instance manager (SIM) including packages like Sitecore PowerShell Extensions and other stuff you want to have installed you can make a backup (right-click on your site > Backup) as a fresh restore point in case things get terribly wrong. 

    Note that the backups are made in the folder C:\websites\\Backups.

    Install the latest version of SIM from

  • sitecore SIM - succesful install but no databases

    I was busy with an installation of sitecore through the sitecore instance manager (SIM), asnd everything seemed to be ok, but I had no databases.

    I gave Network Service read/write access on my c:\websites folder, but when I looked the SIM logs (Home > Bundled tools > SIM logs) I saw the error:

    System.Data.SqlClient.SqlException (0x80131904): Unable to open the physical file "C:\websites\\Databases\Sitecore.core.mdf". Operating system error 5: "5(Access denied.)".

    When I gave Network Service full control on the folder c:\websites it worked.

    Install the latest version of SIM from