Copied to clipboard

Flag this post as spam?

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


  • Viktor Bergman 11 posts 31 karma points
    Oct 26, 2010 @ 20:17
    Viktor Bergman
    0

    Why can I not add a form to a contentpage?

    I can add my form to a template, but not a contentpage. Instead it crashes.

    I've recorded what happens:

    http://screencast.com/t/SJctbfp0A2

  • Rich Green 2246 posts 4006 karma points
    Oct 26, 2010 @ 21:28
    Rich Green
    0

    Have you tried a different browser? I know that Chrome has issues with inserting macros into the Rich Text Editor

    Rich

  • Viktor Bergman 11 posts 31 karma points
    Oct 27, 2010 @ 07:57
    Viktor Bergman
    0

    Well atleast it does'nt crash in Internet Explorer. I can add the macro and publish it, but when I view the page in my browser (Chrome and IE) I just see two buttons:

    "Previous" and "Next"

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 27, 2010 @ 08:09
    Tim Geyssens
    1

    Hey Viktor,

    It's currently an umbraco core bug, inserting a macro in the rte using chrome will fail...

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Oct 27, 2010 @ 08:33
    Sebastiaan Janssen
    0

    Aha! I thought I broke something in my site.. Good to know! 

    Tim: I asked you at umbUKFest to be able to add forms to a template using its alias instead of the guid, this is why I needed that (so I could deploy the template across to my live environment without changing anything). Of course, this is still a valid feature request, you might not want your editors to be able to mess with the inserting forms.

  • Viktor Bergman 11 posts 31 karma points
    Oct 27, 2010 @ 08:43
    Viktor Bergman
    0

    Tim, I can live with that until it gets fixed. But what about the other issue I ran into while I was using IE instead?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Oct 27, 2010 @ 09:22
    Tim Geyssens
    0

    @Viktor,

    Make sure the contour macro is inside a form with runat="server" attribute

  • Viktor Bergman 11 posts 31 karma points
    Oct 27, 2010 @ 09:38
    Viktor Bergman
    0

    Thanks!

  • Viktor Bergman 11 posts 31 karma points
    Nov 08, 2010 @ 15:17
    Viktor Bergman
    0

    Now it no longer works even if i've added <form runat="server"> ... </form>.

    Not even if I insert the contour form directly into the template

  • Per Ploug Hansen 208 posts 129 karma points
    Nov 09, 2010 @ 11:34
    Per Ploug Hansen
    0

    Do you get any errors when running the page with the form on it? we need more information to be able to help you out

    If there is no errors please add ?umbDebugShowTrace=true to the url to get the stack trace and look in there for errors

    /Per

     

  • Viktor Bergman 11 posts 31 karma points
    Nov 09, 2010 @ 12:40
    Viktor Bergman
    0

    From the stacktrace:

    Fel att lägga makro Infoga form från Umbraco Contour
    Kontroller samlingen kan inte ändras eftersom kontrollen innehåller kod block (dvs <% ...%>).
      på System.Web.UI.ControlCollection.Add (Control barn)
      på Umbraco.Forms.UI.Usercontrols.RenderForm.RenderUi () i D: \ TeamCity \ buildAgent \ work \ e4473b9ec9597356 \ Umbraco.Forms.UI \ Usercontrols \ RenderForm.ascx.cs: line 314
      på Umbraco.Forms.UI.Usercontrols.RenderForm.OnInit (EventArgs e) i D: \ TeamCity \ buildAgent \ work \ e4473b9ec9597356 \ Umbraco.Forms.UI \ Usercontrols \ RenderForm.ascx.cs: line 265
      på System.Web.UI.Control.InitRecursive (Control namingContainer)
      på System.Web.UI.Control.AddedControl (Control, Int32 index)
      på System.Web.UI.ControlCollection.Add (Control barn)
      på umbraco.presentation.templateControls.Macro.CreateChildControls ()

  • Viktor Bergman 11 posts 31 karma points
    Nov 09, 2010 @ 14:55
    Viktor Bergman
    0

    I found the cause of the error!

    My CSS is included dynamically with <% ... %> in the main masterpage. I had to put that segment in a <asp:placeholder> so it would'nt disturb the rest of the page.

  • 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