Help! All Templates vanished, deleted something I shouldn't!
Hello!
Ok, I need someone who knows the umbraco database..
Here's what happened;
I tried creating a new template called "Product" and it told me one already existed but it created it calling it's self as "Product1".
I tried to find the exisiting template called "Product" but compeltely missed it (duh!) so renamed my "Product1" to "Product" (both name and alias). Then it threw an error "Key already exists" but saved it, I then noticed I had two templates called "Product" listed in the tree.
My existing page linked to the "Product" template lost it's reference to it. I thought I'd be able to fix it by creating a new template again called "Product1" as this name no longer existed and relink it, but it threw the "Key already exists" error again but created it anyway!
My final hope (or so I thought) was to go into the DB and find the extra templates and delete them.. so I went into "cmsTemplate" and deleted 2 extra ones.
Now all my templates have vanished from the tree!!!
So ok, I know I really shouldn't have done this but I though It'd work!
Luckily this isn't a live site, but I have no backup and it's going to take me ages to recreate it all!
I had similar issue recently client had deleted a master template. Can you do a sql select query in the cmstemplates table and paste the results also can you paste list of templates you have in your templates dir. It probably needs some fiddling for one of the missing parents and that should get your templates loading again.
Ps after doing that touch the web.config (open it in editor and put space or press return so that we get rebuild) as the template list in the tree is cached.
the error is that new i.e. it started happening after the db change you just made or was it already occuring? also what version of umbraco are you using?
try creating manually in the templates directory template called Product.Master if not already there see if that fixes the problem if fact make all the templates in table have corresponding file.
How did you know which row(s) was the offending one?
I'm having a similar problem where my templates are lost and doc types are spitting out that same error as yours after upgrading from 4.0.4.2 to 4.5.2.
Help! All Templates vanished, deleted something I shouldn't!
Hello!
Ok, I need someone who knows the umbraco database..
Here's what happened;
I tried creating a new template called "Product" and it told me one already existed but it created it calling it's self as "Product1".
I tried to find the exisiting template called "Product" but compeltely missed it (duh!) so renamed my "Product1" to "Product" (both name and alias). Then it threw an error "Key already exists" but saved it, I then noticed I had two templates called "Product" listed in the tree.
My existing page linked to the "Product" template lost it's reference to it.
I thought I'd be able to fix it by creating a new template again called "Product1" as this name no longer existed and relink it, but it threw the "Key already exists" error again but created it anyway!
My final hope (or so I thought) was to go into the DB and find the extra templates and delete them.. so I went into "cmsTemplate" and deleted 2 extra ones.
Now all my templates have vanished from the tree!!!
So ok, I know I really shouldn't have done this but I though It'd work!
Luckily this isn't a live site, but I have no backup and it's going to take me ages to recreate it all!
Can someone help me put it right!
Thanks so much!
Bex
bex,
I had similar issue recently client had deleted a master template. Can you do a sql select query in the cmstemplates table and paste the results also can you paste list of templates you have in your templates dir. It probably needs some fiddling for one of the missing parents and that should get your templates loading again.
Regards
Ismail
It wont let me post my reply.. or it's not showing!
Ok template rows from templates table are: (assume you don't need to see the design column?)
1 1045 1049 umbBlogDatefolder
2 1046 1049 umbBlogpost
3 1047 NULL CommentRss
4 1048 NULL Rss
5 1049 NULL umbMaster
6 1050 1049 umbTextpage
7 1051 1049 umbHomepage
8 1077 1049 Home
9 1080 1049 Shop
11 1083 1049 Cart
12 1084 1049 Frontpage
13 1085 1049 MainMaster
14 1086 1049 Page
15 1087 NULL Product
16 1088 1049 ProductList
Templates in folder
Same as above but also
P
Product1
ProductPage (forgot I tried calling it this too...)
Test (two i tried testing and then stupidly also deleted from DB)
test1
Can you help with these?
Thanks so much!
try updating the db table so that for Product the parent id is 1049.
Regards
Ismail
Ps after doing that touch the web.config (open it in editor and put space or press return so that we get rebuild) as the template list in the tree is cached.
Regards
Ismail
Hi Ismail!
I changed the "Master" Id (assume thats what you meant) but it made no different!
I touched the webconfig.. even restarted my machine for good measure but still doesn't show my templates.
if it helps when I try adding a template I get an error:
Do you know what the realtionsships are in the Db so I can try working through them to wrok out whats going on?
Or do you have anoher suggestion?
Thanks
Bex
bex,
the error is that new i.e. it started happening after the db change you just made or was it already occuring? also what version of umbraco are you using?
Regards
Ismail
No the error was happening before.. should have said!
I am using 4.6.1.
try creating manually in the templates directory template called Product.Master if not already there see if that fixes the problem if fact make all the templates in table have corresponding file.
Regards
Ismail
I have the opposite problem! I have more template files than templates listed in the database!
I've been trying to find the source for 4.6.1 so I can debug it but can't seem to find it! Think I'm going to start over at the rate :((((
I FIXED IT! YAAAAAAAAAAAAAAAAAAAAAAAAAAAAY!
All but given up hope and came across this post:
http://our.umbraco.org/forum/core/general/14341-Make-mistake-in-SQL-Database
All I need to do was delete the offending row(s) from the umbracoNode table and all my templates reappeared!
Thanks for all your help Ismail!
Hi Bex,
How did you know which row(s) was the offending one?
I'm having a similar problem where my templates are lost and doc types are spitting out that same error as yours after upgrading from 4.0.4.2 to 4.5.2.
Thanks
Kim
is working on a reply...