Web forms for marketers missing formItem


I encountered the following issue in our test environment I thought it worth to share it here.
If you get the following issue it means WFFM couldn't find the location of your forms.
By default forms are stores under "/sitecore/system/Modules/Web Forms for Marketers/Website" sitecore item node. The forms root can be overwritten in site node.

To resolve the issue make sure formsRoot is pointing to valid path

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sites>
      <site name="llcomauthortest" patch:before="site[@name='website']" hostName="ll.dev.xxxx.com" virtualFolder="/authortest" physicalFolder="/test" rootPath="/sitecore/content/xxxx/test" startItem="/home" database="master" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" mvcarea="xxxx" mvcNamespaces="xxxxxx" formsRoot="/sitecore/content/xxxx/Shared/Forms" enableItemLanguageFallback="true" appendSlashes="true" siteResolving="true" />
    </sites>
  </sitecore>
</configuration>


formItem

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: formItem

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: formItem]
   Sitecore.Form.Core.Configuration.ThemesManager.RegisterCssScript(Page page, Item form, Item contextItem) +822
   Sitecore.Forms.Shell.UI.CreateFormWizard.OnLoad(EventArgs e) +599
   Sitecore.Forms.Shell.UI.InsertFormWizard.OnLoad(EventArgs e) +108

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
   System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
   Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) +337
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178