Copied to clipboard

Flag this post as spam?

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


  • sra 13 posts 33 karma points
    Jul 27, 2010 @ 15:48
    sra
    0

    can't delete a template

    Always remain in the 'deleting' , "network service" aave sufficient authority.


    thanks for help

  • Chris Gaskell 59 posts 142 karma points
    Jul 27, 2010 @ 16:26
    Chris Gaskell
    0

    Sra,

    IIS may have a lock on the template, try recycling the app pool / website.

    Thanks,

    Chris.

  • sra 13 posts 33 karma points
    Jul 28, 2010 @ 03:17
    sra
    0

    Still does not work, what there are other reasons?

  • Seth Niemuth 275 posts 397 karma points
    Jul 29, 2010 @ 10:55
    Seth Niemuth
    0

    Check to make sure that you don't have 2 templates with the same name or 2 templates with the same alias.

     

  • Seth Niemuth 275 posts 397 karma points
    Jul 29, 2010 @ 10:59
    Seth Niemuth
    0

    I was also having this problem and in order to delete the template, I had to remove it from all the allowed template sections in my document types.

  • sra 13 posts 33 karma points
    Jul 30, 2010 @ 02:38
    sra
    0

    yes, i had 2 templates with the same name.

    Do you mean delete document types first?

  • Rik Helsen 670 posts 873 karma points
    Jul 30, 2010 @ 09:17
    Rik Helsen
    0

    There was a bug in 4.5 that was fixed in 4.5.1 related to showing "deleting..." and not doing anything.

     

    generally you want to check if there are no pages still using the template, this prevents it from being deleted.

  • sra 13 posts 33 karma points
    Jul 30, 2010 @ 09:50
    sra
    0

    Thanks a lot, I've started a 4.5.1.

  • Seth Niemuth 275 posts 397 karma points
    Jul 30, 2010 @ 10:12
    Seth Niemuth
    0

    If you have 2 templates with the same name, then you need to delete one of them. I am using 4.5 and was getting that 'deleting...' and not doing anything as I had a document type which had the template I wanted to delete checked in the list of allowed templates. So, what I had to do was uncheck the template I wanted to delete from the list of allowed templates from any document types that they were selected on.

  • Sar 2 posts 23 karma points
    Aug 28, 2010 @ 01:31
    Sar
    1

    I renamed one of the templates so that they don't have the same name and alias. Then it allowed me to delete. I am using 4.5.1

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 01, 2010 @ 13:20
    Jeroen Breuer
    0

    I'm using Umbraco 4.5.2 and still have these problems. Should this already have been fixed?

    Jeroen

  • Arnt Grøstad 29 posts 49 karma points
    Nov 01, 2010 @ 14:54
    Arnt Grøstad
    0

    Jeroen: Im on same versjon (and .net 4.0) having the same problem.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 01, 2010 @ 15:17
    Jeroen Breuer
    0

    I've created a workitem for this which also explains why it doesn't work. Please vote for it: http://umbraco.codeplex.com/workitem/29306.

    Jeroen

  • Arnt Grøstad 29 posts 49 karma points
    Nov 01, 2010 @ 19:15
    Arnt Grøstad
    0

    Just voted for it :)
    But, are there no easy solution for getting rid of templates that I "accedentialy" created with same alias?

  • Chad Rosenthal 272 posts 474 karma points
    Nov 01, 2010 @ 19:23
    Chad Rosenthal
    0

    Just ran into the same issue. Added this to the codeplex site.

    Any ideas?

    So I had the bright idea to manually go in and delete the item from the database. I change the templateId in the cmsDocument table to Null for all references to the template. Then removed the reference in cmsDocumentType. Then was able to delete the entries in cmsTemplate. Now, my Template Folder won't even display any templates and i get the following error: 

    At /umbraco/webservices/TreeDataService.ashx?rnd=a2bfe1de5e864b14b263d20c3e8acde4&id=-1&treeType=templates&contextMenu=true&isDialog=false&rnd2=33.8 (Referred by: http://localhost/umbraco/umbraco.aspx):

    At this point, I'm hosed and don't know where to go from here.

  • Arnt Grøstad 29 posts 49 karma points
    Nov 01, 2010 @ 19:38
    Arnt Grøstad
    0

    Chad: I was pretty close to start editing th DB myself, but to afraid to start mess up something :)
    Have an appointment with my DB administrator tomorrow, so I'll hope we'll figure out something then.
    Though I really hope there is an easyer way than start fiddling with the cmsTables.
    I'll get back to u on how it wen't with my DBA guy.

  • Chad Rosenthal 272 posts 474 karma points
    Nov 01, 2010 @ 19:58
    Chad Rosenthal
    0

    I wish I could give @jbreuer19 a hive five, since he just saved my behind.

    Apparently, even though there isn't a data dependency, you still have to delete the item in UmbracoNodes table. I had some data conflicts, but once I fixed those, my templates folder now contains content again and I'm saved!

    Thanks!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Nov 01, 2010 @ 22:16
    Jeroen Breuer
    1

    You can still thank me ;). Glad your problem is solved. Had the exact same thing today. Don't know why the data also needs to be removed from the umbracoNode table, but that fixes it.

    Jeroen

  • Arnt Grøstad 29 posts 49 karma points
    Nov 03, 2010 @ 09:35
    Arnt Grøstad
    0

    Working my carma up. when it's passing 70, you'll get a High Five jeroen and Chad
    I can actually delete templates again :)

    Free cup of tea for you guys at next codegarden :)

  • Jonathan Lathigee 56 posts 99 karma points
    Jan 20, 2011 @ 00:37
    Jonathan Lathigee
    0

    Thanks Jeroen & Chad for the hint about also deleting from umbracoNode table - just saved my bacon.

     

  • Funka! 398 posts 661 karma points
    Nov 02, 2011 @ 22:54
    Funka!
    0

    OK, so it was 10 months ago that there was any activity in this thread, but I'm experiencing this same problem where i cannot delete a template and am not getting a helpful message, my guess is because there are older document versions that still reference my template and thus are preventing its deletion.

    The descritpion in the work item at http://umbraco.codeplex.com/workitem/29306 is exactly what I would have guessed is happening to me:

    It's impossible to delete a template if you have a document/node which uses this template. This seems logical, but if you give the document another template you still can't delete the old template because the document/node still has a relation to the old template in an old version of the document/node. You should be able to delete the template if the newest version of the document/node doesn't use the template.

    Although the work item says this was "resolved", I'm not sure how that is the case, since in my 4.7.1 installation when I right-click to delete the template, i get this very confusing message in the bubble:

    Error handling action
    Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery

    I have made certain that I have no current documents or document types referencing this template. (I checked the [cmsDocument] and [cmsDocumentType] tables to ensure this.) However, I **do** see lots of prior document versions that still reference my template.

    So it seems that the only way to delete a template that (A) was once used somewhere and (B) is no longer needed, you need to crack open the database and reset a bunch of templateId references in the cmsDocument table first. Then you can probably delete the template from the backoffice. It would be nice if the backoffice would do this for you as a prerequisite step. (See following comment for why I think this should be the assumption)

    ...

    One final note:  there is a comment in the aforementioned work item from Hartvig himself that says:

    This won't be changed as it makes perfectly sense in a versioned environment. As the template is associated to an old version of the document it's only natural that it can't be deleted. I agree on the message though!

    I am having a hard time accepting this claim, because while yes the documents themselves are versioned, the templates are not. For example, if I have an archived (older) document that is referencing a templateID of 1234, that doesn't mean anything, since template 1234 may have been changed a dozen times since then. Thus, why should the number 1234 be so significant as to require permanent archiving?

    Thank you for reading this, and hopefully this helps someone else running into this same problem!

     

  • Jonathan Lathigee 56 posts 99 karma points
    Nov 02, 2011 @ 23:51
    Jonathan Lathigee
    0

    As an alternative workaround, I have also used the "UnVersion" package to remove older versions of pages without having to resort to mucking in the db -- though I've done that as well :)

    I understand and agree that the current issues with changing templates is not ideal.

    Jonathan

Please Sign in or register to post replies

Write your reply to:

Draft