Copied to clipboard

Flag this post as spam?

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


  • Tom Maton 387 posts 660 karma points
    Jun 01, 2010 @ 16:14
    Tom Maton
    0

    Error when trying to edit in canvas

    Hi All,

    I'm hoping someone can help me as my Client loves this feature after showing a demo and now it doesn't seem to be working.

    Everytime I go to Edit in Canvas I get the following error message:

     

    The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

    [HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
    System.Web.UI.ControlCollection.Add(Control child) +8677431
    umbraco.presentation.masterpages._default.AddLiveEditingSupport() +115
    umbraco.presentation.masterpages._default.Page_Load(Object sender, EventArgs e) +35

    [ApplicationException: Error adding Canvas support.]
    umbraco.presentation.masterpages._default.Page_Load(Object sender, EventArgs e) +89
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Control.LoadRecursive() +141
    System.Web.UI.Control.LoadRecursive() +141
    System.Web.UI.Control.LoadRecursive() +141
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    And then every page becomes like that so cant see any of my site for about 30 minutes then its all working again.

    Anyone experienced this before?

    Thanks

    Tom

     

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jun 01, 2010 @ 16:17
    Douglas Robar
    0

    Hi, Tom,

    Take a look at your template(s). Do you have any <% ... %> code blocks in them?

    Otherwise, simplify your template(s) by removing one control or .net macro at a time until Canvas works again... then you'll know which item is the culprit and we can look more closely at it.

    Oh, and you might find a bit more information in the umbracoLog table, to direct you in your search for the cause of this error.

     

    Let us know what you find out.

    cheers,
    doug.

     

  • Tom Maton 387 posts 660 karma points
    Jun 01, 2010 @ 16:46
    Tom Maton
    0

    Found the issue: Seems that the following had been entered onto the master page:

    <%= DateTime.Now.Year.ToString() %>

    Which caused it to blow up!!

    Thanks for the advice Doug

    Tom

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jun 01, 2010 @ 17:15
    Douglas Robar
    0

    Super!

    Here are some other ways to handle the year that are Canvans-compatible... http://blog.percipientstudios.com/2010/1/2/the-never-expiring-copyright-date.aspx

    cheers,
    doug.

  • Tom Maton 387 posts 660 karma points
    Jun 01, 2010 @ 17:21
    Tom Maton
    0

    Cheers Doug,

    I went down the route of using the umbraco library.

    Thanks

    Tom

  • 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.

Please Sign in or register to post replies