Copied to clipboard

Flag this post as spam?

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


  • David Bartholomew 2 posts 22 karma points
    Jul 27, 2011 @ 01:40
    David Bartholomew
    0

    MasterPages problems...

    Hello there Umbraco community, I am pretty new to Umbraco, .Net, and xslt, but have been frantically trying to absorb as much info as possible in as little time as possible. I have just inherited a website that was developed using xslt macros in Umbraco 3.0.3.

    Long story short, I failed at attempts to upgrade the system  to the current Umbraco build (and due to serious problems with the current database, I've decided we shouldn't even if I could) and have been moving content from the old to the new over the past week or so. I was able to dowload a package that converted the old xslt files to the new standard, and did that successfully.  One of the main problems I ran into was that the templates were using a syntax not supported anylonger ( <?UMBRACO_MACRO macroAlias="...etc), and after doing some research, I found the new syntax ( <umbraco:Macro Alias="...etc) and so I went about changing all of the tags in each Template.

    <?UMBRACO_TEMPLATE_LOAD_CHILD/>

    I replaced with 

    <asp:ContentPlaceHolder runat="server" id="childContent" /> 

    and in nested templates I wrapped the content in

    <asp:Content ContentPlaceHolderID="childContent" runat="server"></asp:Content> 

    (The xslt files arent working properly either, unless I drop the "NiceUrl" and put in the direct path.)

     

    The stack trace error I get is the following

    Master template is the same as the current template. It would course an endless loop!

    [HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
    System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +670
    System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +77
    System.Web.UI.Page.PerformPreInit() +210
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1700

    I guess my question is, should the templating work the same between the two Umbraco versions? (Unfortunately I don't have access to the original developer...)

    Also, when nesting templates using the code I posted above, do all child templates use the same ContentPlaceHolder IDs? And if not, is there a way to declare multiple child templates?

     

    Just some info on my development system...

    Windows 7 Enterprise on a virtual server running the native IIS

    ASP.NET v4.0

    Umbraco v4.7.0

    MS-SQL Server 2008 R2

    Thanks in advance...

    Dave

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jul 27, 2011 @ 08:21
    Dirk De Grave
    0

    Dave,

    Upgrading from a v3+ to a v4.7 install is...hmmm, not going to be an easy task, as you'll have to perform on (almost) a version by version upgrade, meaning you'll first have to upgrade to 3.5, then 3.6, and then start looking at v4.0 before upgrading to other v4.+ versions.

    I'm thinking you've got two options (well actualy three) depending on time and budget:

    - Don't upgrade, just leave the site as is

    - Perform the upgrade version after version

    - Start from a clean v4.7 install, and move over site and content

    Personally, I wouldn't care about option two, as I'm pretty sure resources to perform the upgrade will be the same or even higher compared to option 3.

     

    Hope this helps.

    Regards,

    /Dirk

     

     

Please Sign in or register to post replies

Write your reply to:

Draft