Copied to clipboard

Flag this post as spam?

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


  • Jytte Madsen 11 posts 31 karma points
    May 23, 2013 @ 18:33
    Jytte Madsen
    0

    can not delete templates

    I´m trying to learn Umbra from scratch and been making my own small templates.

    But now I want to delete some of them and I can´t

    I get the message

     

    Error handling action

    Elementet er allerede blevet tilføjet.

    Nøgle i ordbog 'umhomepage'

    Nøgle der blev tilføjet: umbhomepage

     

    Have I done something wrong?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 23, 2013 @ 21:38
    Jan Skovgaard
    0

    Hi Jytte and welcome to our :)

    So it seems to me judging from the above text that it's an error you see when deleting a dictionary item rather than a template?

    Could  you perhaps post a screendump of the error and where you're trying to delete from in the backoffice? I think that will make it easier. I also have a suspicion that the danish translation of the error message is adding some confusion - at least for me even though I'm danish. I always get confused when tech stuff is translated :)

    Looking forward to hearing from you.

    /Jan

  • Jytte Madsen 11 posts 31 karma points
    May 23, 2013 @ 22:15
    Jytte Madsen
    0

    When I right-click on a template and choose delete I get the Error-message above.
    I do not know what a dictionary item is.

    But I think I might have currupted my database because now I can not even delete my templates, I´m getting the error

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

    Hope you can help me

    /Jytte

  • Jytte Madsen 11 posts 31 karma points
    May 23, 2013 @ 22:17
    Jytte Madsen
    0

    Sorry I ment to write

    But I think I might have currupted my database because now I can not even save my templates,

    \Jytte

  • Jytte Madsen 11 posts 31 karma points
    May 25, 2013 @ 11:55
    Jytte Madsen
    0

    Searching around i the forum I found these solutions to my problems

    1. I could not delete those of my templates that wasn´t assigned to a document type.
      By dymmy-assigning them to a document type I could delete them.
    2. I tryed installing a Package that didn´t quite work in my umbraco version. And It seem I couldn´t uninstall i either.
      After trying some different things I was dum enough to try installing the package again. 
      This was dum because Now I had duplicate templates and trouble both saving and deleting.

      In my database (SQL CE) I tryed

                       select uniqueID, count(*) from umbracoNode group by uniqueID having count(*)>1

              and found that the field uniqueID had duplicate entries

             After manually changing these uniqueID´s I got the save and delete template working again

    What I just don´t understand is how it is possible to get duplicate values in at uniqueID-field -
    isn´t that suppose to give a key-vialation warning and NOT insert a value?

    I´m not am not so keen trying installing other packages if I risk getting duplicate uniqueID-fields again...

    Or is it because I use SQL CE I get this problem? - is there no unique key contrains in this database?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 25, 2013 @ 12:04
    Jan Skovgaard
    0

    Hi Jytte

    Good to hear you got it working again. I remember seeing this error before but I can't remember why it happens / what triggers it.

    When you work with your website do you then edit the templates using the umbraco editor or do you edit them outside of Umbraco? It may have something to do with this. If you edit templates and macroes inside Umbraco I recommend that you start editing them outside of umbraco using a proper editor like visual studio or sublime text.

    It don't think it has something to do with CE SQL since I've seen this on MSSQL installs as well. 

    /Jan

  • Jytte Madsen 11 posts 31 karma points
    May 25, 2013 @ 12:22
    Jytte Madsen
    0

    I am using the umbraco editor to edit my templates and it must be a "bug" here that you can not delete a tempate unless it is assigned to a document type. I plan to use visual studio later when I know some more about Umbraco.

    Have you seen duplicate enties in a field called UniqueID in MS SQL as well?  - And wouldn´t you call that a bug too?

    Would you consider it safe to install packages or should one always take a DB backup before installing a new package?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 25, 2013 @ 12:59
    Jan Skovgaard
    0

    Hi Jytte

    Indeed it's a bug and you are very welcome to add it to the issue tracker here http://issues.umbraco.org so the core team can have a look at it and hopefully find a solution. If you file a bug report please share the link to it in here as well should others come across this issue so they can go and vote it up.

    It's just that it's a rare issue and when I saw it last (some year ago in my situation) we managed to fix it somehow and forgot all about filing a bug report and we have not seen it since. :) - I can just remember it happened because we edited the templates inside Umbraco.

    But usually you're able to delete templates even though they are not attached to a document type. Sounds to me like assigning the template to a documentype to be able to delete it is a workaround - it's not how things usually works. Normally it's no problem to delete a template that has not been assigned to at document type.

    I would consider it safe to install packages - but if you're not 100% confident in doing so I think you should make a backup so it's easy to rollback if something goes wrong. That's always a good thing to do anyway.

    If you're using version control it's just a matter of making sure everything is commited before installing the package in question then it's easy to just rollback to the branch before the installation.

    Otherwise you can simply just copy all of your files to another directory - and that's really it since CE SQL is an embedded database that lives on the disk inside the App_Data folder.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft