Search code examples
sitecoreteamcityoctopus-deploysitecore8octopack

ReferenceError: scForm is not defined in Sitecore 8


I get this javascript-error in Sitecore 8 > Control Panel when e.g. clicking "Install a package" or any other link:

ReferenceError: scForm is not defined

Looking in Firebug, seems like a file is missing: http://my.site/-/speak/v1/assets/main.js.


Solution

  • Found out: this error occurs, because the file App_Config/Include/.Sitecore.Speak.Important.config is missing.

    Why is it missing? Because filename starts with a period '.', and we use TeamCity and Octopus Deploy / OctoPack to generate a NuGet package for deploying.

    This is by-design behaviour by OctoPack - i.e. to not include files with leading periods in output packages (see here). But as comments state, there is now an option to allow for dot-files to deploy:

    In your build-build step in TeamCity (runner type MsBuild or Visual Studio (sln)), in the field Command line parameters, insert or append the following:

    /p:OctoPackNuGetArguments=-NoDefaultExcludes

    Who the heck names files with a leading period anyway...