Sitecore Sitecore

Sitecore 9 Forms – The form was not loaded due to an error

March 1, 2018

So today I decided to try out Sitecore 9’s Forms engine for the first time.

I clicked on the Create button and then selected Blank Form

From there I was greeted with this error

The form was not loaded due to an error

Great. My first form isn’t going well.

So I opened up the main log and saw this error:

10616 17:08:37 ERROR Application error.
Exception: System.InvalidOperationException
Message: The partial view 'Form' was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/FormBuilder/Form.cshtml
~/Views/FormBuilder/Form.vbhtml
~/Views/Shared/Form.cshtml
~/Views/Shared/Form.vbhtml
~/views/renderers/Form.vbhtml
~/views/renderers/Form.cshtml
~/Views/FormBuilder/Form.aspx
~/Views/FormBuilder/Form.ascx
~/Views/Shared/Form.aspx
~/Views/Shared/Form.ascx
Source: System.Web.Mvc
   at System.Web.Mvc.PartialViewResult.FindView(ControllerContext context)
   at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Ahah! I know what happened. A few weeks back I was cleaning up the project directory and inside the Views folder I got rid of the Examples and FormBuilder folders. I knew Examples wasn’t needed and I guess I didn’t really think through the other one before deleting it.

So I copied the folder over from another fresh install of Sitecore, went back into the Forms screen and tried creating another form…

Now that looks better!

Only registered users can comment.

  1. I grabbed a fresh copy of FormBuilder from the sitecore install and I’m still seeing this error. What’s even more strange is that after I copy the fresh FormBuiolder in my instance it shows the Form Elements for a few seconds then displays the error. Any ideas? Sitecore 9 update 1.

  2. Tim, did you ever get this resolved? I’m having the exact same issue… A teammate believes it’s related to Sitecore 9’s incompatibility with our dependency injection framework – Ninject.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.