Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Daley 7 posts 87 karma points notactivated
    May 26, 2020 @ 12:56
    Darren Daley
    0

    Hi There,

    I've been trying to integrate umbraco forms into our website. we're using Umbraco 7.12.1 and Umbraco Forms 7.4.1.

    I manually installed Umbraco Forms and then tried to put it via a RTE, but I got the error message below. I'm I missing something ?

    An error occured

    Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

    Exception Details System.Web.HttpException: Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. Stacktrace

    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)

    at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage)

    at System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm)

    at System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter)

    at System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, String controllerName, Object routeValues)

    at ASP.PageViewsMacroPartialsInsertUmbracoFormWithTheme_cshtml.Execute() in C:\Work\branch\website\Views\MacroPartials\InsertUmbracoFormWithTheme.cshtml:line 48

    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()

    at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()

    at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)

    at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)

    at Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult)

    at Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)

    at umbraco.macro.LoadPartialViewMacro(MacroModel macro)

    at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)

    at Umbraco.Web.UmbracoComponentRenderer.RenderMacro(macro m, IDictionary`2 parameters, page umbracoPage)

    at Umbraco.Web.Editors.MacroController.GetMacroResultAsHtml(String macroAlias, Int32 pageId, IDictionary`2 macroParams)

    at lambda_method(Closure , Object , Object[] )

    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>cDisplayClass6_1.3(Object instance, Object[] methodParameters)

    at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Controllers.ApiControllerActionInvoker.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.ActionFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Controllers.ActionFilterResult.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.AuthorizationFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.AuthorizationFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Filters.AuthorizationFilterAttribute.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Controllers.ExceptionFilterResult.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Web.Http.Controllers.ExceptionFilterResult.

    --- End of stack trace from previous location where exception was thrown ---

    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

    at System.Web.Http.Dispatcher.HttpControllerDispatcher.

    Inner Exception System.Web.HttpCompileException: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\cee63a63\317dd5fe\AppWebrender.cshtml.e38f7875.uuxcfpva.0.cs(50): error CS0246: The type or namespace name 'WebViewPage<>' could not be found (are you missing a using directive or an assembly reference?)

    at System.Web.Compilation.AssemblyBuilder.Compile()

    at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)

    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)

    at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath)

    at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)

    at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)

    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.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.<>cDisplayClass3_1.5(IAsyncResult asyncResult)

    at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)

    at System.Web.Mvc.Controller.<>c.

    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.<>c.

    at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)

    at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)

    at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.<>cDisplayClass5_0.0()

    at System.Web.Mvc.HttpHandlerUtil.ServerExecuteHttpHandlerWrapper.Wrap[TResult](Func`1 func)

    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride)

  • Steve Morgan 1346 posts 4453 karma points c-trib
    May 28, 2020 @ 09:51
    Steve Morgan
    0

    Hi Darren,

    I've just tested this on a clean version of Umbraco 7.12.1 and Umbraco Forms 7.4.1 - it works.

    There's obviously something different in your setup - is the RTE in a grid or anything?

    Have you added all the necessary front end bits for forms to your master template?

    I remember seeing a bug myself with the InsertUmbracoFormWithTheme.cshtml on a v7 install... for the life of me I can't remember what I did to fix it. I think it was something to do with how I was rendering the form (using some old code from elsewhere probably).

    Might be worth comparing the version of the Views\MacroPartials\InsertUmbracoFormWithTheme.cshtml partial I have with yours - see if it is an upgrade issue?

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    
    @if (Model.MacroParameters["FormGuid"] != null)
    {
        var s = Model.MacroParameters["FormGuid"].ToString();
        var theme = "";
        var includeScripts = true;
    
        @*
            If a theme is provided as a macro parameter, forms will attempt to use custom theme files
            ex: given the value "test", forms will look up views for the form and fields in a custom directory:
    
            Form will be rendered with
                /Views/Partials/Forms/Themes/test/form.cshml
    
            Fields will be rendered with
                /Views/Partials/Forms/Themes/test/FieldType/[fieldtypename].cshtml
    
            If a file is not available in the custom directory, forms will fallback to the default files in
                /Views/Partials/Forms/Themes/default/
        *@
    
        if(Model.MacroParameters.ContainsKey("FormTheme"))
        {
            theme = Model.MacroParameters["FormTheme"].ToString();
        }
    
        if (Model.MacroParameters.ContainsKey("ExcludeScripts"))
        {
    
            @*
                Inverse the boolean - RenderAction Parameter expects it to be false for exclusion
                But with default value for Macro Paramater boolean/checkbox being false 
                We want to ensure by default we include the scripts next to the form
            *@
            includeScripts = Model.MacroParameters["ExcludeScripts"].ToString() == "0";
        }
    
        var form = new Guid(s);
        var recordGuid = Guid.Empty;
    
        if (string.IsNullOrEmpty(Request.QueryString["recordId"]) == false)
        {
            Guid.TryParse(Request.QueryString["recordId"], out recordGuid);
        }
    
        Html.RenderAction("RenderForm", "UmbracoForms", new {formId = form, recordId = recordGuid, theme = theme, includeScripts = includeScripts });
    }
    

    HTH

    Steve

Please Sign in or register to post replies

Write your reply to:

Draft