We're using Contour v3.0.29 and Umbraco v7.3.6 that was recently upgraded. Forms currently on the website are continuing to work as expected, but any attempts to add a new form to a page using the umbracoContourRazorRenderForm macro generates an error along the lines of:
Value cannot be null.
Parameter name: child
On line: @CurrentPage.GetProperty("content")
First this is try to to the developer section and into the macros folder. Click on the macro for the mbracoContourRazorRenderForm, be sure that it loads a partial view, like the screenshot below.
The order thing, to check is that the parameter also have been added.
Hope this helps and make sense for you although that the name of the file and parameter can be a bit different. CanĀ“t remember if this has been changed, in Umbraco Forms, where my screenshots are from :-)
I currently have a macro available but it is using a razor script from the /macroScripts folder. I don't have a Contour MacroPartial View file - would you happen to have an example of how this should look to be included? Using the file in the /macroScripts folder is what is generating the error.
I've found the MacroPartial file that you mentioned to try it, but that also generates another error about there being no route in the route table for Html.RenderAction("Render", "UmbracoForms", new {formId = g, recordId = recordGuid });
I think we're almost half way between Contour and Umbraco Forms here, so not everything is in place for Forms?
All of that looks to be in place and didn't really change since before the upgrade. Though it might be useful to see what's in your MvcRenderContourForm.cshtml file in case there is something out of line? Otherwise it is more difficult to pinpoint the issue here.
The issue was actually around an Umbraco upgrade, from 7.1.8 using Contour, up to 7.3.6. We didn't upgrade Contour as part of this, and existing forms continued to work but creating new forms or adding the macro to a page caused an error.
We have discovered that the issue must have been the file formatting of the MvcRenderContourForm.cshtml file, as a simple copy/paste of this back into the macroScripts folder resolved the issue, suggesting that nothing was actually out of line within the system!
We may be upgrading to Forms shortly though, so thanks for the pointer towards help for that! :)
Unable to render Contour form after upgrade
We're using Contour v3.0.29 and Umbraco v7.3.6 that was recently upgraded. Forms currently on the website are continuing to work as expected, but any attempts to add a new form to a page using the
umbracoContourRazorRenderForm
macro generates an error along the lines of:The top part of the stack trace is:
Is this a known issue?
Hi Ed,
To things to check up on here.
First this is try to to the developer section and into the macros folder. Click on the macro for the mbracoContourRazorRenderForm, be sure that it loads a partial view, like the screenshot below.
The order thing, to check is that the parameter also have been added.
Hope this helps and make sense for you although that the name of the file and parameter can be a bit different. CanĀ“t remember if this has been changed, in Umbraco Forms, where my screenshots are from :-)
/Dennis
Hi Dennis,
Thanks for the response!
I currently have a macro available but it is using a razor script from the
/macroScripts
folder. I don't have a Contour MacroPartial View file - would you happen to have an example of how this should look to be included? Using the file in the/macroScripts
folder is what is generating the error.Thanks! Ed
Hi Dennis,
I've found the MacroPartial file that you mentioned to try it, but that also generates another error about there being no route in the route table for
Html.RenderAction("Render", "UmbracoForms", new {formId = g, recordId = recordGuid });
I think we're almost half way between Contour and Umbraco Forms here, so not everything is in place for Forms?
Pinging this back into view in case anyone else has any ideas on this one?
Hi Ed,
Sorry for the little late answer but there have been Codegarden in Odense last week.
Things to check is that your macro is linking to a razor file, and have the macro parameter as well like the screenshots below.
Hope this helps,
/Dennis
Hi Dennis,
No problem - hope you enjoyed CodeGarden!
All of that looks to be in place and didn't really change since before the upgrade. Though it might be useful to see what's in your
MvcRenderContourForm.cshtml
file in case there is something out of line? Otherwise it is more difficult to pinpoint the issue here.Hi Ed,
The content of my file is as following:
Best,
/Dennis
Hello Ed,
I am just reading through this chain.
Are you trying to upgrade from Contour to Umbraco Forms is my understanding?
If so then this may help you moving parts across successfully - https://our.umbraco.org/projects/developer-tools/umbraco-forms-migration/
Thanks,
Warren
Hi Warren,
Thanks for picking this up.
The issue was actually around an Umbraco upgrade, from 7.1.8 using Contour, up to 7.3.6. We didn't upgrade Contour as part of this, and existing forms continued to work but creating new forms or adding the macro to a page caused an error.
We have discovered that the issue must have been the file formatting of the
MvcRenderContourForm.cshtml
file, as a simple copy/paste of this back into themacroScripts
folder resolved the issue, suggesting that nothing was actually out of line within the system!We may be upgrading to Forms shortly though, so thanks for the pointer towards help for that! :)
Ed
is working on a reply...