Long field names cause the Razor Form Rendering Macro to fail
Hiya,
I've spotted an issue that if you have a long field caption, you get an error stating that the file path is too long, must be betweeen xx and xx characters and the form doesn't render, when using the Razor rendering macro. If you switch to the webforms rendering macro, it works fine. This is using the latest version of Contour from the nightlies.
I've debugged as much as I can, and it looks like the call to @Html.Partial(FieldViewResolver.GetFieldView(Model.FormId, f.FieldTypeName, f.Caption), f) in the rendering macro is the culprit, specifically the FieldViewResolver I think. I guess it's creating some kind of MVC style path based on the field caption maybe?
Can this be fixed? As a workaround, we're using the webforms renderer, but we'd ideally like to use the Razor one so that we can control the markup.
Long field names cause the Razor Form Rendering Macro to fail
Hiya,
I've spotted an issue that if you have a long field caption, you get an error stating that the file path is too long, must be betweeen xx and xx characters and the form doesn't render, when using the Razor rendering macro. If you switch to the webforms rendering macro, it works fine. This is using the latest version of Contour from the nightlies.
I've debugged as much as I can, and it looks like the call to @Html.Partial(FieldViewResolver.GetFieldView(Model.FormId, f.FieldTypeName, f.Caption), f) in the rendering macro is the culprit, specifically the FieldViewResolver I think. I guess it's creating some kind of MVC style path based on the field caption maybe?
Can this be fixed? As a workaround, we're using the webforms renderer, but we'd ideally like to use the Razor one so that we can control the markup.
Thanks for reporting, will look into it
Looking into it now, added issue to the tracker http://issues.umbraco.org/issue/CON-224
Fixed in 3.0.7 WIP, if you download the upgrade http://nightly.umbraco.org/Umbraco%20Contour/3.0.7%20WIP/ archive and you'll just need to update the umbraco.forms.mvc assembly to make it work
Nice one, thanks Tim, that was super fast :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.