Copied to clipboard

Flag this post as spam?

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


  • Thomas T 66 posts 227 karma points
    Feb 19, 2015 @ 05:51
    Thomas T
    0

    Template can't be deleted when uninstall package

    I installed Blog4Umbraco 2.0.26 for Umbraco version 7. When I uninstalled this package, templates remains there.I tried to delete them but i can't delete them. When I tried to save my own template after few changes, I can't save.It shows error like as below...How can I remove them completely..

                                         

    When I tried to delete the template, it shows error like below, 

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 19, 2015 @ 06:46
    Jan Skovgaard
    0

    Hi Thomas

    It's unfortunate that you were able to install this package since it's not compatible with Umbraco from 4.6+.

    Can't remember if it's possible to simply rename the templates inside the Umbraco backoffice and after the rename then delete it.

    Otherwise try this trick that Simon Anthony is writing about here http://www.simonantony.net/knowledge-base/articles/error-handling-action-problem-when-deleting-template-in-umbraco/ - In short you should just assign the templates to any document type and then try to delete the templates - It might work in v7 as well.

    Hope this helps.

    /Jan

  • Thomas T 66 posts 227 karma points
    Feb 19, 2015 @ 07:41
    Thomas T
    0

    Hi Jan, 

                 Can you tell how to assign template to document type ?..I tried but i can't delete the template....

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 19, 2015 @ 08:04
    Jan Skovgaard
    0

    Hi Thomas

    When you go to the "Document types" folder you should just click on one of your document types and then on the "Info" tab go to the "Allowed templates" part and put a check on those templates you want to delete.

    Then afterwards try deleting the templates.

    If this does not work and the renaming approach does not work then you will have to do things directly in the database, which is not desirable.

    Another way around it could perhaps be to make a fresh installation of Umbraco and import your current content to this solution - However I don't recommend that unless you have just started out building the site. If not then there's probably too much at stake by taking this approach.

    /Jan

  • Thomas T 66 posts 227 karma points
    Feb 19, 2015 @ 08:39
    Thomas T
    0

    Hi Jan,

                 I tried.But I can't delete those templates which are in 'Templates' section under 'Settings' tab.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 19, 2015 @ 08:45
    Jan Skovgaard
    0

    Hi Thomas

    Ok - So what about the option of moving your site to a fresh installation? Is that an option?

    If you're using MSSQL then you can perhaps use this SQL script to delete ALL templates in your database - But you should not do this unless you know what it is you're doing. It also means that if you run it you'll need to recreate those templates that you currently need and use. So make sure to keep a backup of those template files on disk so you can create them using the backoffice afterwards and then overwrite the created files with the old backup of your templates.

    In general - Before doing this make sure to backup your current database and all of your files!

    https://www.snip2code.com/Snippet/141241/Delete-all-templates-from-umbraco-db

    Be very very careful if you do this! I can't stress it enough - Only do it if you know what you're doing.

    /Jan

  • Thomas T 66 posts 227 karma points
    Feb 19, 2015 @ 10:15
    Thomas T
    0

    Hi Jan,

                Before trying to delete those templates, I did migration from SQL CE to MSSQL database...I don't know whether this made problem or not...

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 19, 2015 @ 11:00
    Jan Skovgaard
    0

    Hi Thomas

    I don't think that's the cause of the issue.

    /Jan

  • Thomas T 66 posts 227 karma points
    Feb 19, 2015 @ 11:46
    Thomas T
    100

    Hi Jan,

                 I just delete the records which have information about those templates from MSSQL database tables. Not entire table records... Before doing this, I took database backup for safety..Now it works.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 19, 2015 @ 12:29
    Jan Skovgaard
    0

    Hi Thomas

    Happy to hear you managed to get it solved. Please mark the post as solved so others who may come across the same issue can go straight to the solution.

    Happy coding! :)

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies