Object of type 'System.String' cannot be converted to type 'System.Boolean'
Hi all,
Hoping someone can point me in the right direction with a bit of an odd issue.
I've got the latest version of Umbraco Forms installed onto Umbraco 7.7.7. In addition I've got the Preplex package - Umbraco Forms on Perplex steroids installed.
I've created a simple form with the following fields:
Name, Email, Phone (all perplex text strings), Summary ( perplex text area), Attachments (perplex file upload).
When I first call a page with the form on, on the front end I get an odd error:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'
The bit that's really odd is that if I refresh the page after the YSOD, it works. No problems. But the first time the page loads after a website restart the YSOD is back. This appears to be happening in the back office as well when trying to edit the form.
I can't seem to find out what parameters it's complaining about so I'm looking for some guidance on how to identify and solve this issue? Any ideas would be great.
I work at Perplex and helped create our forms package. Does the issue only occur if your use the Perplex FieldTypes in your form? If so, can you make sure you have the latest version (1.8) of our package installed, as it should work fine with Umbraco 7.7. If that still does not work, try to create a new form to see if that makes a difference.
It seems to crash at some point after Umbraco.Core.Field.get_FieldType, which all our field types also provide (see here for PerplexTextField for example]) as we inherit from Umbraco.Core.Field. I am not sure how that leads to a String to Boolean conversion error though.
We're on umbraco 7.7.4 and having the same issue, but it only occurs with #the forms that have the perplex file upload on them. Did you manage to resolve this?
That's good to know someone else is getting the same issue. I hadn't had a chance to revisit it so still have the issue at the minute which is frustrating. At least now there are steps to reproduce :-)
It seems to be caused by the Multi upload setting that is specified on our File Upload field type (see here). I wonder if something perhaps changed in Forms.Core in the way settings are read. The value of this checkbox is saved as a String ("True" or "False"), so that would likely cause this error.
I have changed the code slightly in the way the Multi Upload setting is declared, and it seems to work on my end now. It now longer uses the [Setting] attribute but rather overrides the virtual Settings() method of Umbraco.Forms.Core.FieldType. Not sure why it would make a difference, but I do not get the crash anymore.
Could you try the hotfix I posted on our package page (Perplex.Umbraco.Forms.dll, uploaded just now)? If it works I can update our package soon, although you do not have to update the package as the DLL will be the only thing that will be changed.
From my initial tests I can confirm that this hotfix does indeed seem to resolve the issue. I've not yet tested doing uploads with the form, but it is now rendering without the issue. I'll let you know if there are any issues using it.
I have updated our package to 1.8.1 which includes this new DLL, as it seems to fix the exception. Those of you who already downloaded the DLL separately do not necessarily need to update the package as nothing else was changed.
Daniël, is there any chance of you guys releasing the package as a nuget package? It would be wonderful to have it available that way :-) (I know the question is slightly off topic now)
Ah, apparently we cannot mix the [Setting] attribute with the Settings() dictionary... Should be fixed now in 1.8.2. Also updated the hotfix DLL. GitHub will follow later soon, this is just a side-project for us so I do not actually have too much time for it unfortunately :)
Object of type 'System.String' cannot be converted to type 'System.Boolean'
Hi all,
Hoping someone can point me in the right direction with a bit of an odd issue.
I've got the latest version of Umbraco Forms installed onto Umbraco 7.7.7. In addition I've got the Preplex package - Umbraco Forms on Perplex steroids installed.
I've created a simple form with the following fields:
Name, Email, Phone (all perplex text strings), Summary ( perplex text area), Attachments (perplex file upload).
When I first call a page with the form on, on the front end I get an odd error:
It happens when this line of code executes:
If I continue the execution I get a YSOD which gives a bit more information:
The Stack Trace for the error is as follows:
The bit that's really odd is that if I refresh the page after the YSOD, it works. No problems. But the first time the page loads after a website restart the YSOD is back. This appears to be happening in the back office as well when trying to edit the form.
I can't seem to find out what parameters it's complaining about so I'm looking for some guidance on how to identify and solve this issue? Any ideas would be great.
Thanks,
Nik
Hi Nik,
I work at Perplex and helped create our forms package. Does the issue only occur if your use the Perplex FieldTypes in your form? If so, can you make sure you have the latest version (1.8) of our package installed, as it should work fine with Umbraco 7.7. If that still does not work, try to create a new form to see if that makes a difference.
It seems to crash at some point after
Umbraco.Core.Field.get_FieldType
, which all our field types also provide (see here for PerplexTextField for example]) as we inherit fromUmbraco.Core.Field
. I am not sure how that leads to a String to Boolean conversion error though.Regards, Daniël
We're on umbraco 7.7.4 and having the same issue, but it only occurs with #the forms that have the perplex file upload on them. Did you manage to resolve this?
More information
I was concerned it was something custom I had done, so instead I made a fresh install:
Umbraco 7.7.9 Umbraco Forms 6.0.6 Perplex Forms 1.8
I included the Perplex File upload only on the form, and I get the error:
Also, to replicate, you need to recycle the app pool.
Any help with this would be great.
That's good to know someone else is getting the same issue. I hadn't had a chance to revisit it so still have the issue at the minute which is frustrating. At least now there are steps to reproduce :-)
Hi guys,
It seems to be caused by the Multi upload setting that is specified on our File Upload field type (see here). I wonder if something perhaps changed in Forms.Core in the way settings are read. The value of this checkbox is saved as a String ("True" or "False"), so that would likely cause this error.
I have changed the code slightly in the way the Multi Upload setting is declared, and it seems to work on my end now. It now longer uses the
[Setting]
attribute but rather overrides the virtualSettings()
method ofUmbraco.Forms.Core.FieldType
. Not sure why it would make a difference, but I do not get the crash anymore.Could you try the hotfix I posted on our package page (Perplex.Umbraco.Forms.dll, uploaded just now)? If it works I can update our package soon, although you do not have to update the package as the DLL will be the only thing that will be changed.
-- Daniël
Just registered here to reply to your post, that's working now. I had the same issue, it was indeed caused by the multiple files bool.
That said, I now cannot select file types anymore (and a file size).
Hi Daniël
From my initial tests I can confirm that this hotfix does indeed seem to resolve the issue. I've not yet tested doing uploads with the form, but it is now rendering without the issue. I'll let you know if there are any issues using it.
Thanks,
Nik
I have updated our package to 1.8.1 which includes this new DLL, as it seems to fix the exception. Those of you who already downloaded the DLL separately do not necessarily need to update the package as nothing else was changed.
Daniël, is there any chance of you guys releasing the package as a nuget package? It would be wonderful to have it available that way :-) (I know the question is slightly off topic now)
Thanks Daniël, but it's no longer possible to change the settings of the file types and file sizes. And could you also commit the changes to GitHub?
Hi Umbrakko,
Ah, apparently we cannot mix the
[Setting]
attribute with theSettings()
dictionary... Should be fixed now in 1.8.2. Also updated the hotfix DLL. GitHub will follow later soon, this is just a side-project for us so I do not actually have too much time for it unfortunately :)Awesome, thank you, now it's working fine.
is working on a reply...