Copied to clipboard

Flag this post as spam?

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


  • LeaTark 18 posts 119 karma points
    Nov 07, 2023 @ 13:56
    LeaTark
    0

    Error submitting multi-page Umbraco form

    We get the following error navigating to the second page of a multi-page Umbraco form.

    An unhandled exception occurred while processing the request. InvalidOperationException: The 'Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.DefaultTempDataSerializer' cannot serialize an object of type 'Umbraco.Forms.Web.Models.FormViewModel'. Microsoft.AspNetCore.Mvc.ViewFeatures.Infrastructure.DefaultTempDataSerializer.Serialize(IDictionary

    Single page forms submit OK.

    We're on CMS 10.7.0 with Forms 10.3.3

  • erdihu 4 posts 74 karma points
    21 days ago
    erdihu
    0

    I am having the same issue as well, even with the version 13.1.1. I created an empty site and installed Forms 13.1.1 to try the reproduce the issue but to no avail; it works as expected. I can't see any changes in serializer settings in the code either.

    Were you able to find a solution to this problem?

  • LeaTark 18 posts 119 karma points
    21 days ago
    LeaTark
    100

    I believe our problem stemmed from a missing doctype declaration. Perhaps you have a similar issue?

  • erdihu 4 posts 74 karma points
    21 days ago
    erdihu
    0

    Do you mean the doctype declaration in Master.cshtml?

    <!doctype html>
    

    In that case, it exists in our template.

  • LeaTark 18 posts 119 karma points
    21 days ago
    LeaTark
    0

    Yes, it was missing from our master and overlooked because browsers have the habit of inferring its value and even injecting one in inspector. Sorry it couldn't fix your problem too.

  • erdihu 4 posts 74 karma points
    21 days ago
    erdihu
    0

    Thank you. The test project I created didn't have the doctype declaration yet it still worked but maybe its existence does not matter in the newer Umbraco Forms versions.

    The mysterious thing for us is the multi page forms work on the start page but fail on any subpages. Unfortunately I couldn't find anybody else who has a similar problem on Google.

  • erdihu 4 posts 74 karma points
    21 days ago
    erdihu
    0

    After a day of trial and error I was able to find the root cause of the problem. Our forms are being rendered in a contentGrid and we were rendering the contentGrid with

    @await Html.CachedPartialAsync("ContentGrid", Model, new TimeSpan(8, 0, 0), true, false)
    

    Removing the caching solved the problem:

    @await Html.PartialAsync("ContentGrid", Model)
    
Please Sign in or register to post replies

Write your reply to:

Draft