Copied to clipboard

Flag this post as spam?

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


  • Johan Dahlström 33 posts 146 karma points
    Oct 28, 2020 @ 14:10
    Johan Dahlström
    0

    Submitting Umbraco form results in 404 to /umbraco/RenderMvc

    I'm using an Umbraco Forms form on my view, added by @Umbraco.RenderMacro("renderUmbracoForm", new { FormGuid = Umbraco.Field("testform"), FormTheme = "Default", ExcludeScripts = "0" }).

    When submitting the form, I end up at a 404 page Requested URL: /umbraco/RenderMvc. Why is that? The form action points to the page itself.

    Inspecting the webexception: A public action method 'MyPage' was not found on controller 'Umbraco.Forms.Web.Controllers.UmbracoFormsController'.

    I have tried adding a surfacecontroller matching the page but I never end up in the POST action. Isn't the Umbraco framework supposed to handle this by the default UmbracoFormsController?

  • Chris Evans 137 posts 353 karma points c-trib
    Oct 29, 2020 @ 01:44
    Chris Evans
    0

    Umbraco Forms (before version 8.5) relies on jQuery and other javascript references to operate properly.

    Are you seeing any javascript errors in your browser console (e.g. F12 in Chrome on a PC) or other indiciations that perhaps javascript or jQuery is not available to the form?

    There is more explanation and details about the required setup in the docs, e.g.

    https://our.umbraco.com/Documentation/Add-ons/UmbracoForms/Developer/index-v7

    The exact setup requirements may vary depending on which version of Umbraco CMS and Umbraco Forms you are using. You can switch the docs version using this toggle :

    enter image description here

    Hope this helps,

    Chris

  • Johan Dahlström 33 posts 146 karma points
    Oct 29, 2020 @ 08:16
    Johan Dahlström
    0

    Hey Chris,

    The error is inserted to the DOM as an HTML comment on the error page.

    I've added the required client side scripts and followed the guide.

Please Sign in or register to post replies

Write your reply to:

Draft