Copied to clipboard

Flag this post as spam?

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


  • Sergio 73 posts 93 karma points
    Oct 11, 2011 @ 13:19
    Sergio
    0

    "Master template is the same as the current template". Big performance problem.

    We have serious performance problems because of these:

    "Master template is the same as the current template. It would cause an endless loop! Make sure that the current template ''Template with id: '-1' has another Master Template than itself. You can change this in the template editor under 'Settings"


    The message appears in all the pages. In some of them more than 20 times.

    We have checked the "CmsTemplate" table and everything seems OK. We have 1 MasterPage called "Home" and about 25 more templates, all of them inheriting from "Home". No one has the -1 Id.

    Also, we have code behind in the MasterPage and in the other templates.

    This is the MasterPage (called Home.master):

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" Inherits="AESA.Umbraco.masterpages.Home" %>
    <%@ Register TagPrefix="xxx" Namespace="AESA.Umbraco" Assembly="AESA.Umbraco" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">


     <%=declaracionXML%>
     <!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" <%=htmlAtributoIdioma%>>
      <head>
        <title>
          <%=TituloPagina%>
        </title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
        <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE" />
        <meta content="JavaScript" name="vs_defaultClientScript" />
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
        <base href="<%=urlBaseHost("/css/")%>" />
            <xxx:ReferenciaCSSControl id="css1" runat="server"></xxx:ReferenciaCSSControl>
            
          <link href="<%=urlBaseHost("/css/print.css")%>" rel="stylesheet" type="text/css" media="print"/>
     
       </head>
      <body>
            <asp:ContentPlaceHolder ID="CPHDefault" runat="server">
            </asp:ContentPlaceHolder>

        </body>

    </html>

    </asp:Content>

    And this is one of the other templates:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Home.master" AutoEventWireup="true" Inherits="AESA.Umbraco.masterpages.PL_DIRECCION" %>
    <asp:Content ContentPlaceHolderID="CPHDefault" runat="server">
      <div id="capaCentral">
        <umbraco:Macro Alias="Cabecera" runat="server"></umbraco:Macro>
        
          <div class="capaContenidos" id="capaContenidos">
            <div class="menuIzquierdo" id="menuIzquierdo">
                <umbraco:Macro Alias="MenuDG" runat="server"></umbraco:Macro>
                <umbraco:Macro id="MacroBannerIzquierdo" Alias="BannerIzquierdo" runat="server"></umbraco:Macro>
            </div>
            <div class="contenidos" id="contenidos">
              <%=htmlEstructura1%>        
                
                <umbraco:Macro Alias="RastroMigas" runat="server"></umbraco:Macro>
                <umbraco:Macro Alias="CabeceraCanal" runat="server"></umbraco:Macro>
                <umbraco:Macro Alias="MenuHorizontal" runat="server"></umbraco:Macro>
                
              <%=htmlEstructura2%>
              <div class="capaGenericaContenido">
                <div class="fichaTipo2">
                                  
                  <h1 id="PHTituloh1" class="fichaTipo2_titulo"><%=obtenerHtmlDecode("phtitulo", "h1")%></h1>
                    
                                
                  <div class="fichaTipo2_contenido">
                    <% if (HtmlPlaceHolderVacio("phdescripcion") == false)
                     { %>              
                         <div id="PHDescripcion" runat="server" class="fichaTipo2_descripcion">
                            <%=obtenerHtmlDecode("phdescripcion")%>
                         </div>
                     <%}%>

                    <%=resultado1%>
                                   

                   </div>
                  
                </div>
              </div>
              <%=htmlEstructura3%>
            </div>
            <div class="menuDerecha" id="menuDerecha">
              
                <umbraco:Macro Alias="BannerDerecho" runat="server"></umbraco:Macro>
                <umbraco:Macro Alias="EnlacesInteres" runat="server"></umbraco:Macro>
                <umbraco:Macro Alias="ControlDocumentos" runat="server"></umbraco:Macro>
            </div>
          </div>
          <br />
          
      
      <div class="clear"></div>
     
    </div>
     
    <div class="piePaginaAmpliado" id="Pie1_TablaPie">
     <umbraco:Macro Alias="Pie" runat="server"></umbraco:Macro>
    </div>

    </asp:Content>

     

    About Code Behind, all the templates classes are inheriting from the Home MasterPage class. Here it´s the sample:

    public partial class PL_DIRECCION : Home
        {.......}

    And this is the MasterPage Class:

    public partial class Home : System.Web.UI.MasterPage
        {.....}


    Any idea about where is our problem?


  • Rodion Novoselov 694 posts 859 karma points
    Oct 11, 2011 @ 14:20
    Rodion Novoselov
    0

    It could sound like a stupid question of myself, but have you checked the '~/umbraco/masterpages/default.master' itself?

    Also, isn't it possible that the Home class does some manipulation with its master page settings on PreInit event? (since actually this is an event where the master page can be changed at run-time)

  • Sergio 73 posts 93 karma points
    Oct 11, 2011 @ 15:46
    Sergio
    0

    Yes. I´ve cheked the default masterpage and it seems to be normal:

    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="default.master.cs" Inherits="umbraco.presentation.masterpages._default" %>
    <asp:ContentPlaceHolder ID="ContentPlaceHolderDefault" runat="server">
    </asp:ContentPlaceHolder>

    The codebehind class doesn´t exist but I suppose this is normal in Umbraco because we didn´t change this masterpage, right?

    About the events in the Home masterpage,we only manipulate the Page_Init and the Page_Load.

     

  • Sergio 73 posts 93 karma points
    Oct 11, 2011 @ 16:40
    Sergio
    0

    It´s not a problem with the Templates or Masterpages. Must be a problem with the Macros.

    We have migrated several user controls from a MCMS2002 (in VB.Net) and the arquitecture used is awfull... If we remove 3 macros everything goes much better. Now we´ll have to investigate and rebuild them.

    Anyway, thanks for your help Rodion!

  • Simon steed 374 posts 686 karma points
    Jun 18, 2012 @ 10:27
    Simon steed
    0

    We've got the same problem with one of our client sites, I also noticed the main umbraco.com site has these issues as well. Any update on what was causing them for you?

Please Sign in or register to post replies

Write your reply to:

Draft