Copied to clipboard

Flag this post as spam?

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


  • Ashford Borough Council Dev Team 25 posts 158 karma points
    Feb 10, 2022 @ 15:58
    Ashford Borough Council Dev Team
    0

    Umbraco Forms 8.7.6 Magic Strings Issue

    Having upgraded our Umbraco Forms from 8.3.2 to 8.7.6 we have discovered a problem with magic strings used in one of our form message on submit properties. The magic strings are two session variables which work fine in 8.3.2, but having upgraded to 8.7.6 the magic strings no longer work. Hoping that a picture is worth a thousand words, the following three screen snippets are the message on submit text, the rendered text using v8.3.2 and rendered text using v8.7.6. Any help in getting this working again would be appreciated.

    enter image description here enter image description here enter image description here

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 20, 2022 @ 00:38
    Dennis Aaen
    0

    Hi Ashford,

    I have just tried to see if I could reproduce this on the latest version of Umbraco 8, and the latest version of Umbraco Forms for v8

    Which is Umbraco Forms 8.10.2

    In this version am not able to reproduce what you are experiencing with Magic strings not working

    How did I test this?

    First I made a simple contact form then I made a document type with a template

    In the template i added the following code

    @{
        // Set a test session variable
        Session["TestSessionMessage"] = "Hello";
    }
    

    And then I configured this for the message to display on submit:

    Thank you - this is from the session: [%TestSessionMessage]

    Would it be possible for you to upgrade to Umbraco 8.10.2 and see if it works for you as well

    All the best,

    /Dennis

  • Ashford Borough Council Dev Team 25 posts 158 karma points
    Feb 21, 2022 @ 14:25
    Ashford Borough Council Dev Team
    0

    Hi Dennis, thanks for taking the time to look at this, but I have to insist that this is a FORMS issue not a CMS issue. The test scenario you used does not use forms at all. The fact is that using forms v8.3.2 works and v8.7.6 does not. Having decompiled Umbraco.Forms.Core.dll for each version there are definite code differences in the parsing functions. The forms assemblies were only upgraded in order to fix a security vulnerability up to and including v8.7.5. We are in a strange situation in that we cannot go to the latest version of forms 8 (even then the magic string issue could still exist) because it breaks our CMS at v8.5.5, and we cannot upgrade the CMS very easily as we have made some deeply embedded custom code changes which we simply don't have the resources to re-apply.

    Bottom line is that a magic string in the submission message of a form workflow that worked in Forms 8.3.2 no longer works in Forms 8.7.6 which can be proved by simply swapping out the three Umbraco.Forms assemblies.

    Thanks in anticipation of a resolution.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Feb 22, 2022 @ 01:13
    Dennis Aaen
    0

    Hi Ashford

    I can see that I forgot to include the word Forns in my message last time. So just to make it clear I used Umbraco Forms 8.10.2.

    I got it to work by doing this

    In the template, I added the following code

    @{
        // Set a test session variable
        Session["TestSessionMessage"] = "Hello";
    }
    

    And then I configured this for the message to display on submit:

    Thank you - this is from the session: [%TestSessionMessage]

    And in Umbraco Forms 8.10.2 it worked for me

    I also just tried to install Umbraco Forms 8.10.2 on Umbraco 8.5.5 and it works fine after the install

    You can of course have some custom code that I am not aware of

    Sorry for the little confusion here

    All the best,

    /Dennis

  • Ashford Borough Council Dev Team 25 posts 158 karma points
    Feb 22, 2022 @ 14:09
    Ashford Borough Council Dev Team
    100

    Hi Dennis, I am pleased to report that the issue no longer occurs in Forms v8.8.0 and I was able as before to simply replace just the three Umbraco.Forms assemblies without having to touch any of our customisations. Thanks for your input. Regards, Rob

Please Sign in or register to post replies

Write your reply to:

Draft