Copied to clipboard

Flag this post as spam?

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


  • Derek Williams 1 post 0 karma points
    Jun 29, 2009 @ 19:28
    Derek Williams
    0

    There can be only one 'master' directive.

    I'm getting this error when I try to view any runway pages after a fresh install.  <span style="font-family: Arial,Helvetica,Geneva,SunSans-Regular,sans-serif;"></span>First time using Umbraco and everything I've read says it should be quite easy, but I'm not having luck getting this running.  Any help?

     

    Line 2:  
    Line 3: <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    <span style="color: red;">Line 4: <%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
    </span>Line 5: <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
    Line 6:
  • Jesper Hauge 298 posts 487 karma points c-trib
    Jun 29, 2009 @ 20:24
    Jesper Hauge
    1

    It's a bit difficult to read your code example (alas), but to me it seems that you've placed a <%@ Master %> declaration inside a <asp:Content> tag.

    This is not allowed. Masterpages in umbraco all inherit from the default masterpage placed at /umbraco/masterpages/default.master. When working with masterpages in Umbraco you should create new masterpages by either right-clicking the "Templates" folder in settings, or one of your existing masterpages.

    In your new masterpage, be sure that all new content is placed inside an <asp:Content tag>, and that you do not place any <%@ Master %> directives inside these tags.

    If this error did indeed occur immediatly after a fresh install of the runway templates on top af a fresh umbraco install with no prior creation of templates/masterpages, I suggest you uninstall the runway addon, delete any remaining templates/masterpages, and try installing Runway again. I've used Runway many times for testing purposes, and haven't seen this error before.

    Regards
    .Hauge

  • mat Fergusson 2 posts 22 karma points
    Feb 03, 2012 @ 12:00
    mat Fergusson
    0

    It is likely not your fault. Umbraco 4 does this sometimes.

    I don't know why but on a seemingly random basis it wraps masterpages that have been modified outside the umbraco template editting process with a masterpage declaration, complete with an asp:Content tag.

    (I'm the only one to have seen it in our organisation, but I know its there).

    The trick is to know its going to happen and when you see the message, open the edittor page and delete the extra masterpage and asp:Content (openning and closing) tags.

    eg. The bold text below was added by umbraco. My source control tells me that it wasn't there before I umbraco initialised.

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Email-v2BaseTemplate.master" AutoEventWireup="true" %>
     <asp:Content ContentPlaceHolderID="Email-v2BaseTemplateContentPlaceHolder" runat="server">


    <%@ Master Language="C#" MasterPageFile="/masterpages/Email-v2BaseTemplate.master" AutoEventWireup="true" %>
     <script runat="server">  protected override void OnPreRender(EventArgs e)
       {
         base.OnPreRender(e);
         //CODE
       } </script>
     <asp:content ContentPlaceHolderId="HeaderContent" runat="server">
       <style>
         /* STYLES */
       </style> 
     </asp:content> <asp:content ContentPlaceHolderId="EmailBody" runat="server">
       <umbraco:Item field="BodyTemplate" runat="server"></umbraco:Item>
     </asp:content>
    <asp:content ContentPlaceHolderId="EmailFooter" runat="server">
     </asp:content>

     </asp:Content>

Please Sign in or register to post replies

Write your reply to:

Draft