More in this section

Forums / Developing with Sitefinity / Template (master) breaks CMS

Template (master) breaks CMS

6 posts, 1 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    03 Sep 2009
    Link to this post
    Hi there

    I developed a .master with lots of div in it for layout.

    When I choose this template nothing works anymore. Draging Controls just does nothing. Not even the publish or cancel changes links work anymore. Also can not switch  between layout modes.

    As soon as I switch to the default it works.

    Any idea
    <%@ Master Language="VB" CodeFile="normal.master.vb" Inherits="App_Master_normal" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head runat="server">  
        <title>Gemeinde Hüntwangen</title> 
        <asp:ContentPlaceHolder id="head" runat="server" /> 
     
        <style type="text/css">  
            .style1  
            {  
                width: 910px;  
                height: 0;  
            }  
        </style> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
              <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
        <div class="outer_top">  
        <div class="inner_top">  
        <div class="header">  
        <table class="style1">  
                <tr> 
                    <td rowspan="2">  
                        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/logo.gif"   
                            PostBackUrl="/home.aspx" /> 
                    </td> 
                    <td> 
                        Home usw.</td> 
                </tr> 
                <tr> 
                     
                    <td> 
                        Search usw.</td> 
                </tr> 
            </table> 
    </div> 
          
        <div class="banner"><asp:ContentPlaceHolder id="Banner" runat="server" /> 
              
            
        </div> 
            <div class="MainNavi"><asp:ContentPlaceHolder id="HauptNavigation" runat="server" /> 
              
        <div class="MyContent">  
        <div class="contentLeft">  
        <div class="subnaviTitel"><asp:ContentPlaceHolder id="TitelSubNavigation" runat="server" /> 
            </div> 
        <div class="subnavi"><asp:ContentPlaceHolder id="SubNavigation" runat="server" /> 
            </div> 
        <div class="subnaviNews"><asp:ContentPlaceHolder id="News" runat="server" /> 
            </div> 
        </div> 
        <div class="contentRight">  
        <div class="contentTitel"><asp:ContentPlaceHolder id="ContentTitel" runat="server" /> 
            </div> 
        <div class="contentContent"><asp:ContentPlaceHolder id="Content" runat="server" /> 
            </div> 
        <div class="contentNews"><asp:ContentPlaceHolder id="Bemerkungen" runat="server" /> 
            </div> 
        </div> 
        </div> 
        </div> 
          
         <div class="FooterBreak">&nbsp;</div> 
         </div> 
         </div> 
         <div class="outer_bottom">  
      &nbsp;  
        </div> 
       
        </form> 
    </body> 
    </html> 

    Regards Markus
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    03 Sep 2009
    Link to this post
    Underscores in class names were stripped by forum.

    Regars Markus
  3. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    03 Sep 2009
    Link to this post
    This was the problem

    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/logo.gif"   
                            PostBackUrl="/home.aspx" /> 

    The PostBackUrl="/home.aspx"  did break it.

    I guess that was not a good idea to place it in the .master file.

    Any explaination for me?

    Regards Markus
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    03 Sep 2009
    Link to this post
    Hi Markus Berchtold,

    Thank you for using our services.

    I have taken a look at your master page and have noticed that you have an image button control  (ImageButton1)with a post back URL set. This is the cause of the issues. For more information on the issue please take a look at the following KB article:  Sitefinity page freezes in Edit mode

    To fix this I suggest instead of setting the post back URL property of this control in the master page markup to set it in the code if the page is in live mode. Consider the bellow sample code to do the required:
    Imports Telerik.Cms.Web 
    Partial Class App_Master_normal 
        Inherits System.Web.UI.MasterPage 
        Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
            Dim cmsPage As CmsPageBase = TryCast(Me.Page, CmsPageBase) 
            If cmsPage.PageMode = CmsPageMode.Live Then 
                Me.ImageButton1.PostBackUrl = "~/home.aspx" 
            End If 
        End Sub 
    End Class 
     

    When I applied this to the master page you have set it got working on my end.

    If you have more questions, please feel free to contact us.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    04 Sep 2009
    Link to this post
    As you can see in my last post befor yours. I found it out bymyself. Was thinking about div problems and not the button.

    Thanks for the answer. Is this considerd a bug to be fixed?

    Regards Markus
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    04 Sep 2009
    Link to this post
    Hello Markus Berchtold,

    Thank you for getting back to me.

    I did notice your last post when I was writing my response. We do acknowledge that it is an issue, however currently we can not commit to whether it will be fixed in Sitefinity 3.x versions. One thing is sure though - this problem will be resolved in our next major release - Sitefinity 4.0.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
Register for webinar
6 posts, 1 answered