Copied to clipboard

Flag this post as spam?

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


  • William Charlton 171 posts 218 karma points
    Oct 09, 2013 @ 18:19
    William Charlton
    0

    Can't save template. Umbraco says it is a duplicate

    When setting up a 6.1.4 site and testing Template saving which had been a problem with 6.1.5 and 3.1.6. I first saved a template called ContentMaster. When it saved I went out and celebrated.

    When I came back I forgot I had saved a Template and created a DocType called ContentMaster, so I ended up with two templates called ContentMaster. Not being able to ascertain which belonged to the DocType I deleted the top one and carried on.

    I managed to install Contour and did a few other useful things such as adding a child template. When I checked the front end I realised I had two lots of BodyText one in ContentMaster and one in the child Template (called Text). Not a problem, delete the one in ContentMaster - er no.

    If I try to modify the template and then save I get an error:

    Template not saved

    Please make sure that you do not have 2 templates with the same alias

    It looks like Umbraco still thinks I have two templates with the same name but I don't - what to do?

    Not a problem, delete the one in Text - er no.

    Bizarrely Umbraco won't let me save the Text template either displaying the same error.

    This IS tedious.

     

  • William Charlton 171 posts 218 karma points
    Oct 09, 2013 @ 18:39
    William Charlton
    0

    I have just looked in the database table cmsTemplate and there are just two entries with ID's 1 and 3 (with different Aliases, ContentMaster and Text) so somewhere the system is still "seeing" ID = 2

    Cacheing?

    I have restarted SQL and closed and opened the browser - no difference.

    PS I have managed to move ahead by editing in NotePad but that doesn't actually solve the problem

  • Rich Green 2246 posts 4008 karma points
    Oct 09, 2013 @ 18:44
    Rich Green
    0

    Rename your template with the problem in Umbraco, can't remember exactly but I believe this allows you to delete the template with the issue.

  • William Charlton 171 posts 218 karma points
    Oct 09, 2013 @ 18:47
    William Charlton
    0

    Rich, I don't want to delete any template. I have already deleted the duplicate. The problem is the system seems to think it is still there :(

    I will try a rename anyway to see if that jolts anything.

  • William Charlton 171 posts 218 karma points
    Oct 09, 2013 @ 18:50
    William Charlton
    0

    Why does this forum sometimes save duplicate messages another old Umbraco bug that was never fixed?

  • Rich Green 2246 posts 4008 karma points
    Oct 09, 2013 @ 18:52
    Rich Green
    0

    Yeah, I think you rename it first, then it allows you to delete the other template, then you can rename it.

    Head is a bit fuzzy, but I managed to sort this out via the UI before I'm sure.

  • Rich Green 2246 posts 4008 karma points
    Oct 09, 2013 @ 18:52
    Rich Green
    0

    Or, you create one with the same name (yes, again) and then rename one and delete the other.

  • William Charlton 171 posts 218 karma points
    Oct 10, 2013 @ 12:18
    William Charlton
    0

    Richard, This rings a bell with me too.

    The problem is I can't save the template.

    This means because I can't save then I can't rename.

    I have now got a blank homepage which is great and going direct to the URL gives me XML Parsing Error: no element found
    Location: http://localhost/home.aspx
    Line Number 1, Column 1:

    Time for ANOTHER rebuild. This time I think I will try ver 4.xx The Ver 6.xx definitely look a bit flakey

    At what point do I throw in the towel?

  • Rich Green 2246 posts 4008 karma points
    Oct 10, 2013 @ 12:21
    Rich Green
    0

    I've seen this problem a few times over the years but not seen it for a while.

    I'd still recommend going with v6, the steps to reproduce this error will be the same for both versions I imagine (though I can't remember exactly what causes the error)

    Rich

  • Rich Green 2246 posts 4008 karma points
    Oct 10, 2013 @ 12:22
    Rich Green
    0

    Or try the DB way

     (refid being the 'id' show in the status bar when you select a template in the admin cms window)

    DELETE FROM  [cmsDocumentType]

    WHERE templateNodeId = refid

    GO

    DELETE FROM [cmsTemplate]

    WHERE nodeid  = refid

    GO

    DELETE FROM [umbracoNode]

    WHERE id  = refid

    GO

  • Manoj Dube 1 post 21 karma points
    Dec 19, 2013 @ 15:04
    Manoj Dube
    0

    hey Will,

    why don't you try refreshing the umbraco cache, it may be holding up something in DB due to which it is giving this error.

    as you have already deleted the template.

    Thanks,

    MD

  • William Charlton 171 posts 218 karma points
    Dec 19, 2013 @ 16:16
    William Charlton
    0

    Thanks for all your suggestions.

    And thanks Manoj for waking me up - I tried that and tried a complete reboot but as you say I think it was a duplicate aliases in the database type problem. I think Rich was right with the delete routine, thanks Rich.

    I must also apologise for not updating this ticket but in the end I took the rather drastic step of getting a new PC. I was running XP and resisting change but it was only a matter of time and I was having a lot of issues with Umbraco under IIS 5.

    I have not yet had any problems but then I have not tried to recreate this one.

Please Sign in or register to post replies

Write your reply to:

Draft