Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Peck 690 posts 1896 karma points c-trib
    Aug 06, 2012 @ 16:38
    David Peck
    0

    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>:

        <script src='<%= ResolveUrl("~/js/libs/modernizr-2.5.3.min.js") %>' type="text/javascript"></scri
    

    By removing the code block, the issue is resolved,

  • David Peck 690 posts 1896 karma points c-trib
    Aug 06, 2012 @ 16:48
    David Peck
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft