Resolved: Contour only renders 'next' and 'previous' buttons
I was looking for a solution to why contour was not rendering my form, but only rendering a Next and a Previous button. The solution was in this forum post but I thought I'd document again as it seems like a potentially common problem.
When I checked the error stack (via ?umbDebugShowTrace=true in your query string) I found:
Error adding macro Insert form from Umbraco Contour
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
at System.Web.UI.ControlCollection.Add(Control child)
The cause of this was that Contour injects content in to the <head> and so you can't have any code blocks in the <head>:
An alternative if it is important to keep the code blocks is just to disable the default stylesheet on the form.
A suggestion for Contour development would be to catch this exception and either display a friendly error for the developer or add the stylesheet in the body.
Resolved: Contour only renders 'next' and 'previous' buttons
I was looking for a solution to why contour was not rendering my form, but only rendering a Next and a Previous button. The solution was in this forum post but I thought I'd document again as it seems like a potentially common problem.
When I checked the error stack (via ?umbDebugShowTrace=true in your query string) I found:
Error adding macro Insert form from Umbraco Contour The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). at System.Web.UI.ControlCollection.Add(Control child)
The cause of this was that Contour injects content in to the <head> and so you can't have any code blocks in the <head>:
By removing the code block, the issue is resolved,
An alternative if it is important to keep the code blocks is just to disable the default stylesheet on the form.
A suggestion for Contour development would be to catch this exception and either display a friendly error for the developer or add the stylesheet in the body.
is working on a reply...