Copied to clipboard

Flag this post as spam?

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


  • Tim 225 posts 690 karma points
    Jul 06, 2010 @ 18:14
    Tim
    0

    Very odd template behaviour - Umbraco 4.5

    Hi,

    Just spotted some rather odd template behaviour.

    I am currently working in a development environment with several other developers. We are all using a shared database.

    The issue is that if another developer creates a template in the Umbraco backend the template is then subsequently created on the other developer machines (by Umbraco) but incorrectly.

    We are using Subversion to store our template HTML so once the origional is checked in the rest of the developers can grab the latest template file and all is well.

    However in the meantime a corrupted template has been created by Umbraco, here's an example of the sort of thing that Umbraco creates:

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
    
    <asp:Content ContentPlaceHolderID="MasterContentPlaceHolder" runat="server">
    <%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
    
    <asp:content ContentPlaceHolderId="NavigationContentPlaceHolder" runat="server">
    
    </asp:content>
    
    <asp:content ContentPlaceHolderId="LayoutContentPlaceHolder" runat="server">
        <h1>Hello world</h1>
    </asp:content>
    </asp:Content>
    

    As you can see Umbraco has wrapped the origional template code in another Master page directive and contentPlaceHolder.

    Anyone know if this is a know bug, if not I'll report to codeplex.

    Tim

  • David Conlisk 432 posts 1008 karma points
    Jul 06, 2010 @ 18:25
    David Conlisk
    0

    I've seen this with 4.1 beta 2, where if I set up a new site it was creating the files on disk from the db - but as you say, incorrectly.

    Edit: I haven't logged it as a bug, but worth doing a search in codeplex anyway :)

  • Tim 225 posts 690 karma points
    Jul 06, 2010 @ 18:40
    Tim
    0

    Update:

    I've done some more testing on this issue and it only seems to effect child templates. It doesn't happen on top level master templates only their children.

    I'll have a hunt in the source and see if I can confirm the bug.

    T

     

  • Tim 225 posts 690 karma points
    Jul 06, 2010 @ 19:42
    Tim
    0

    Update 2!

    Bug found. Patched and about to be submitted to codeplex.

    Don't say I never give you anything Umbraco ;-)

    T

  • Kim Andersen 1447 posts 2197 karma points MVP
    Jul 06, 2010 @ 19:45
    Kim Andersen
    0

    I've seen this kind of behaviour as well, but in version 4.0.3 though. Also tried to find the reason, but I couldn't find anything consistently. However I only saw the error when saving a template inside of Umbraco.

    I haven't reported it as a bug on Codeplex either.

    /Kim A

  • Tim 225 posts 690 karma points
    Jul 06, 2010 @ 20:48
    Tim
    0

    OK patch submitted.

    Here's hoping it get's in the next release....

    T

Please Sign in or register to post replies

Write your reply to:

Draft