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,
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.
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!
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.
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.
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,
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
Hi Jan,
Can you tell how to assign template to document type ?..I tried but i can't delete the template....
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
Hi Jan,
I tried.But I can't delete those templates which are in 'Templates' section under 'Settings' tab.
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
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...
Hi Thomas
I don't think that's the cause of the issue.
/Jan
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.
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
is working on a reply...
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.