Umbraco Forms throwing InvalidCastException on submit
I just installed Umbraco Forms v8.4.0 (via nuget) into an Umbraco CMS v8.5.3 project (with SQL Server). I have added references to jQuery validate v1.19.1 and jQuery unobtrusive validate (it doesn't seem to have a version) and I have followed the directions on this page ... https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Rendering-Scripts/ ... since my javascript files are referenced outside the HTML HEAD section.
I create a form with just one field and embedded it into a template using:
Umbraco.RenderMacro("renderUmbracoForm", new { FormGuid = "db967296-c296-493b-8da9-7e3cf2f0b090", ExcludedScripts = "1" })
When I submit the form I get the following error: Unable to cast object of type 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'.
What am I missing? I've been over this 10 times and I can't see what I'm doing wrong. I google this error and I find very little so apparently I'm the only one having this issue.
I am glad to hear that I'm not the only one! Yes, they are looking into it.
I did some further investigation myself with a clean install of Umbraco 8.5.3 and Forms 8.4.0 with the starter kit and while I didn't get the same error I did find that Forms is failing silently when I create a form without the default "consent" question included.
What I mean by that is when you create a form in the backoffice and select "Blank form" you actually start with a form that contains a field that is a checkbox. It's for getting the submitter's consent to store their data.
If I remove that field and add my own fields when the form is submitted I get redirected to another page (instead of showing the thank-you message), no data is saved in the backoffice and no workflows are triggered.
There are no errors in the umbraco log either!?
Unfortunately, on my working project I tried a form that includes the "consent" field and I still get the same YSOD error. So ???
Not sure if this is really part of the problem or just a red herring.
That sounds like a bug in Umbraco Forms 8.4.0 which was just recently released. How about downgrading to 8.3.2, unless you really need something from 8.4.0?
A feature in 8.4.0 is that inserting all form post data to the database now happens in one bulk transaction. Reading the stack trace I see InsertBulk on multiple locations.
I considered downgrading Forms but before my site went live I wanted to upgrade CMS to the latest version. So I did that first ... upgraded CMS from 8.5.3 to 8.6.0 and that made my problem go away.
So, yeah, apparently U 8.5.3 and UF 8.3.2 will work but so will U 8.6.0 and UF 8.4.0.
Umbraco Forms throwing InvalidCastException on submit
I just installed Umbraco Forms v8.4.0 (via nuget) into an Umbraco CMS v8.5.3 project (with SQL Server). I have added references to jQuery validate v1.19.1 and jQuery unobtrusive validate (it doesn't seem to have a version) and I have followed the directions on this page ... https://our.umbraco.com/documentation/Add-ons/UmbracoForms/Developer/Rendering-Scripts/ ... since my javascript files are referenced outside the HTML HEAD section.
I create a form with just one field and embedded it into a template using:
When I submit the form I get the following error: Unable to cast object of type 'Umbraco.Core.Persistence.FaultHandling.RetryDbConnection' to type 'System.Data.SqlClient.SqlConnection'.
Here's the stack trace:
What am I missing? I've been over this 10 times and I can't see what I'm doing wrong. I google this error and I find very little so apparently I'm the only one having this issue.
Can anyone help??
Thanks
Comment author was deleted
Hey Chester, best is to get in touch with support... you should be able to submit request from your profile on https://umbraco.com/
I submitted a support ticket. Thanks!
Hey Chester
I have the same issue. Did you get any great advice from the support?
Thanks
Hi Peter,
I am glad to hear that I'm not the only one! Yes, they are looking into it.
I did some further investigation myself with a clean install of Umbraco 8.5.3 and Forms 8.4.0 with the starter kit and while I didn't get the same error I did find that Forms is failing silently when I create a form without the default "consent" question included.
What I mean by that is when you create a form in the backoffice and select "Blank form" you actually start with a form that contains a field that is a checkbox. It's for getting the submitter's consent to store their data.
If I remove that field and add my own fields when the form is submitted I get redirected to another page (instead of showing the thank-you message), no data is saved in the backoffice and no workflows are triggered.
There are no errors in the umbraco log either!?
Unfortunately, on my working project I tried a form that includes the "consent" field and I still get the same YSOD error. So ???
Not sure if this is really part of the problem or just a red herring.
That sounds like a bug in Umbraco Forms 8.4.0 which was just recently released. How about downgrading to 8.3.2, unless you really need something from 8.4.0?
A feature in 8.4.0 is that inserting all form post data to the database now happens in one bulk transaction. Reading the stack trace I see
InsertBulk
on multiple locations.Same here. I have downgraded to 8.3.2 and it works fine. Thank you!
I considered downgrading Forms but before my site went live I wanted to upgrade CMS to the latest version. So I did that first ... upgraded CMS from 8.5.3 to 8.6.0 and that made my problem go away.
So, yeah, apparently U 8.5.3 and UF 8.3.2 will work but so will U 8.6.0 and UF 8.4.0.
I was having the same issue and can confirm that upgrading to Umb 8.6.1 with Forms at 8.4.0 fixes the issue.
is working on a reply...