Copied to clipboard

Flag this post as spam?

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


  • PierreD Savard 183 posts 290 karma points
    Apr 29, 2015 @ 03:48
    PierreD Savard
    0

    Custom controler and Umbraco Form = not working

    Hi, I am using custom controller like you can see here

    https://our.umbraco.org/documentation/Reference/Mvc/custom-controllers

    but if I add some form in GridLayout macro adding, The form appears, but after filling it, the "Thanks for sending us this message" do not show up. But in the Umbraco backend in form -> Entries, the form result are there.

    Any suggestion? Some log I can use to trying to correct that?

    Thanks

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Apr 29, 2015 @ 08:08
    Dennis Aaen
    0

    Hi PierreD,

    You can find the logs in the /App_Data/Logs in your file system of your Umbraco installation.

    Hope this helps,

    /Dennis

  • PierreD Savard 183 posts 290 karma points
    May 01, 2015 @ 01:37
    PierreD Savard
    0

    nothing in the log.

  • Comment author was deleted

    May 06, 2015 @ 09:17

    So the form can captures the entries but it doesn't display the thank you message? What does it display on form submit then, just blank or the form?

  • PierreD Savard 183 posts 290 karma points
    May 06, 2015 @ 14:26
    PierreD Savard
    0

    The form blink but stil there with all information in it. If the form have 2 pages, the form blink and stay at the page one.

  • Comment author was deleted

    May 07, 2015 @ 13:50

    Hmm sounds like an issue with TempData, will try to reproduce

  • Comment author was deleted

    May 07, 2015 @ 14:01

    Any chance you already tried this with custom forms and see if they have the same issue?

  • PierreD Savard 183 posts 290 karma points
    May 07, 2015 @ 14:11
    PierreD Savard
    0

    I don't understand, you said custom form like HTML standard form? Fo now the only way I make my form working, is to isolate the form in a new _target=blank than use another razord page that derived from @inherits Umbraco.Web.Mvc.UmbracoTemplatePage directly. This wau the form work like expected.

    Thanks

  • Comment author was deleted

    May 07, 2015 @ 14:13

    Yeah custom forms created with a surface controller so not using Umbraco Forms, but will give it a try

  • PierreD Savard 183 posts 290 karma points
    May 07, 2015 @ 14:15
    PierreD Savard
    0

    hooo ok, not I don't try this yet.

  • Comment author was deleted

    May 08, 2015 @ 14:00

    Just tried with a custom controller and everything still works (so unable to reproduce), would it be possible to send your project to tg at umbraco dot com ? That way I can run locally and debug the issue you are having

  • ZNS 60 posts 198 karma points
    May 12, 2015 @ 12:00
    ZNS
    0

    I can confirm this on 7.2.4. When clicking on "next" in a multi page form or submitting a form with a "message on submit" you end up on a blank page. No source code. If I use "Go to page on submit" it works. I also use route hijacking, that is I have custom controllers for my document types.

  • Comment author was deleted

    May 12, 2015 @ 12:28

    ok thanks for the details would you mind sending your project to tg at umbraco dot com? Since I have tried a simple route hijacking example and can't reproduce, form still works fine in my case

  • ZNS 60 posts 198 karma points
    May 12, 2015 @ 12:42
    ZNS
    0

    Sorry, I am not able to send you our source code. This is what's in the log when clicking on "next" in a form. The only warning is that the physical template file is missing, maybe that's what causing the empty page?

    2015-05-12 12:40:36,630 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindDomain: Culture="sv"
    2015-05-12 12:40:36,631 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindPublishedContentAndTemplate: Path="/sv/formular"
    2015-05-12 12:40:36,631 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindPublishedContent: Begin finders
    2015-05-12 12:40:36,631 [42] DEBUG Umbraco.Web.Routing.ContentFinderByNiceUrl - [Thread 21] Test route "1054/formular"
    2015-05-12 12:40:36,633 [42] DEBUG Umbraco.Web.Routing.ContentFinderByNiceUrl - [Thread 21] Got content, id=2281
    2015-05-12 12:40:36,633 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindPublishedContent: End finders, a document was found (took 2ms)
    2015-05-12 12:40:36,633 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] HandlePublishedContent: Begin
    2015-05-12 12:40:36,634 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] EnsurePublishedContentAccess: Page is not protected
    2015-05-12 12:40:36,634 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] HandlePublishedContent: End
    2015-05-12 12:40:36,634 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindTemplate: Look for template id=1079
    2015-05-12 12:40:36,635 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindTemplate: Got template id=1079 alias="default"
    2015-05-12 12:40:36,635 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] FindTemplate: Running with template id=1079 alias="default"
    2015-05-12 12:40:36,635 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] HandleWildcardDomains: Path="-1,2160,2136,1054,2281"
    2015-05-12 12:40:36,635 [42] DEBUG Umbraco.Web.Routing.PublishedContentRequestEngine - [Thread 21] HandleWildcardDomains: No match.
    2015-05-12 12:40:36,636 [42] DEBUG Umbraco.Web.UmbracoModule - [Thread 21] Response status: Redirect=none, Is404=false, StatusCode=0
    2015-05-12 12:40:36,717 [42] INFO  Umbraco.Web.Mvc.UmbracoPageResult - [Thread 21] Executing Umbraco RouteDefinition controller
    2015-05-12 12:40:36,728 [42] DEBUG umbraco.macro - [Thread 21] Render Macro: Insert form, type: PartialView, cache: 0)
    2015-05-12 12:40:36,728 [42] DEBUG umbraco.macro - [Thread 21] Executing Partial View:
    2015-05-12 12:40:36,732 [42] DEBUG umbraco.macro - [Thread 21] Complete (took 3ms)
    2015-05-12 12:40:36,732 [42] DEBUG umbraco.macro - [Thread 21] Complete (took 3ms)
    2015-05-12 12:40:36,735 [42] WARN  Umbraco.Web.Mvc.RenderMvcController - [Thread 21] No physical template file was found for template default
    2015-05-12 12:40:36,736 [42] INFO  Umbraco.Web.Mvc.UmbracoPageResult - [Thread 21] Finished (took 19ms)
    2015-05-12 12:40:36,737 [42] DEBUG Umbraco.Web.UmbracoModule - [Thread 21] Total milliseconds for umbraco request to process: 110.0292
  • PierreD Savard 183 posts 290 karma points
    May 12, 2015 @ 16:45
    PierreD Savard
    0

    Il will create a test project for you. I will give you a link soon

  • PierreD Savard 183 posts 290 karma points
    May 12, 2015 @ 17:36
    PierreD Savard
    0

    Crap, I create a small projet. But I can't add the form in my macro. When I try to add macro, the form do not appears! ;-( I try to reinstall the form, but the same problem persist.

  • Comment author was deleted

    May 13, 2015 @ 10:38

    Yeah I also created a small project to test but everything works as it should so there must be something going on in your controller that is causing the issue

  • ZNS 60 posts 198 karma points
    May 21, 2015 @ 10:54
    ZNS
    0

    Some more info on this:

    In my custom controller I override Index and "return CurrentTemplate(Model);". In a http get this returns a System.Web.Mvc.ViewResult as expected. When I press the "next"-button or submit a form with only a message the controller Index method runs as normal but CurrentTemplate(Model) returns a System.Web.Mvc.ContentResult instead with empty content and content type set to null.

  • ZNS 60 posts 198 karma points
    May 22, 2015 @ 11:39
    ZNS
    0

    Well the reason I get an empty "ContentResult" is because "EnsurePhsyicalViewExists()" fails in "CurrentTemplate()" (as seen in the log above also). It fails because it tries to find a view for the "UmbracoForms"-controller which doesn't exist.

    https://github.com/umbraco/Umbraco-CMS/blob/release-7.2.5/src/Umbraco.Web/Mvc/RenderMvcController.cs

  • ZNS 60 posts 198 karma points
    May 25, 2015 @ 13:34
    ZNS
    0

    Can I file a bug report on this somewhere? I'd really like to see this fixed since now we need to tell our customers that they must use redirect to page for their forms.

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    May 25, 2015 @ 13:42
    Dennis Aaen
    0

    Hi ZNS,

    Yup, can report a bug using the issue tracker http://issues.umbraco.org/ if you discovers a bug in Umbraco CMS or in one of the Add-ons.

    You will find the issue tracker for the Umbraco Forms here http://issues.umbraco.org/issues/CON, and the documentation on how to write a good bug or feature request report. https://our.umbraco.org/contribute/report-an-issue-or-request-a-feature

    /Dennis

  • ZNS 60 posts 198 karma points
    May 27, 2015 @ 12:54
    ZNS
    0

    Issue created. I also submitted a test project which recreates this issue.

    http://issues.umbraco.org/issue/CON-762

  • Comment author was deleted

    May 27, 2015 @ 12:55

    That is awesome thanks! I've asked one of the core devs to take a look so hopefully we'll have a solution for you soon

Please Sign in or register to post replies

Write your reply to:

Draft