I started to create my Umraco website and it was working fine. I wanted a new template and tried to create it, but it showed a server error and when I cancelled the process, all the other templates also vanished. My document type is also not working, it shows a server error. I am unable to create new templates, even if I do so I cannot see them under the template folder...Kindly someone help me with this issue, I am not able to figure out what is the problem and how to bring back the other templates.
it sounds like some data got corrupted when the error occured, do you have by any chance more details on the server error you've seen? Have a look in the /masterpages directory, is your new template in there? Might be worth a try to move all templates out of that folder and see if that helps (and later on put them back one by one).
Do you have access to the Umbraco log to find out what might have happened?
Your best bet in this case though is a server backup from the night before if that is available!
The templates get stored in the /Masterpages directory, they have the alias of the template you've created in Umbraco as name and .master as extension.
Could you grab a screenshot of the error and post it here?
You could try the registry entry 'hack' as christopher explains, he also writes that it's an official Microsoft thing anyway.
My guess is that you've added a new document type, gave it a name that asp.net doesn't like and clicked 'create' with the 'also create template' tick box on. That would at least explain why you can't see templates and document types.
Do you know which name you have given the document type/template?
If you can't get it to work with the registry entry fom Christopher's blog you will most likely have to dig a bit into the database. Let me know if you could fix the problem or if we need to get down the database route.
I also came across the same article, but didn't go through it properly.
Yeah, I used space and '?' mark's while assigning a name for the template and I am regretting it now. I have requested one of my server admins here to check the registry entry. Meanwhile can you please explain me how I can fix it the database way?
before you do anything please make a db backup (if you haven't done so already...)!
Were you able to locate the template you've created in the /Masterpages folder? If so, delete it (or move it somewhere else).
I haven't done this myself yet, so no guarantee. ;)
Let's get rid of the template first:
Open your favourite db management tool, e.g. Management Studio
Connect to your database
Look up cmsTemplate, there should be an entry with your template name, remember the [nodeId] value from it
Check if there are any documents created that use this template (there shouldn't be any): SELECT * FROM cmsDocument WHERE templateId = [nodeId]. If there are set their templateId value to NULL.
Same goes for cmsDocumentType: SELECT * FROM cmsDocumentType WHERE templateNodeId = [nodeId]. Remember the [contentTypeNodeId]! Delete any entries of that you find which have the nodeId as templateNodeId.
Now you can delete the entry in cmsTemplate with the [pk]
Finally we have to delete the entry for that 'node' in the umbracoNode table: SELECT * FROM umbracoNode WHERE id = [nodeId].
You should now be able to see the templates in Umbraco again. So let's finish off the document type:
Check table cmsContentType: SELECT * FROM cmsContentType WHERE nodeId = [contentTypeNodeId]. Delete all found entries.
And finally delete the doc type from table umbracoNode: SELECT * FROM umbracoNode WHERE id = [contentTypeNodeId].
The Document Types should now be browsable as well in Umbraco!
Template problem :( !!...Help please
Hi All,
I started to create my Umraco website and it was working fine. I wanted a new template and tried to create it, but it showed a server error and when I cancelled the process, all the other templates also vanished. My document type is also not working, it shows a server error. I am unable to create new templates, even if I do so I cannot see them under the template folder...Kindly someone help me with this issue, I am not able to figure out what is the problem and how to bring back the other templates.
Appreciate your help.
Thank you
Anthony.
Hi Anthony,
it sounds like some data got corrupted when the error occured, do you have by any chance more details on the server error you've seen? Have a look in the /masterpages directory, is your new template in there? Might be worth a try to move all templates out of that folder and see if that helps (and later on put them back one by one).
Do you have access to the Umbraco log to find out what might have happened?
Your best bet in this case though is a server backup from the night before if that is available!
Hi,
Thank you for the quick reply, I am getting a runtime error whe I try to access the Document types.
Also is there any way to view the master templates which I created from the website folder. Where will they actually get stored?...
Thank you,
Anthony.
The templates get stored in the /Masterpages directory, they have the alias of the template you've created in Umbraco as name and .master as extension.
Could you grab a screenshot of the error and post it here?
Please find below the error,
Hi Anthony,
can you please modify the web.config file so we can see the actual error, you need to replace the part it mentions:
Replace
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.html"/>
with
<customErrors mode="Off"/>
You can (and should) later switch that back. Please let me know what you get when you've got the actual error message.
Hi Sascha,
Please find below the screenshot of the actual error, which I get when I access the document type and template folders,
Hi Anthony,
it looks pretty much like there is an 'illegal' character somewhere. I've googled it a bit and found this information quite enlightening:
http://www.christophercrooker.com/use-any-characters-you-want-in-your-urls-with-aspnet-4-and-iis
You could try the registry entry 'hack' as christopher explains, he also writes that it's an official Microsoft thing anyway.
My guess is that you've added a new document type, gave it a name that asp.net doesn't like and clicked 'create' with the 'also create template' tick box on. That would at least explain why you can't see templates and document types.
Do you know which name you have given the document type/template?
If you can't get it to work with the registry entry fom Christopher's blog you will most likely have to dig a bit into the database. Let me know if you could fix the problem or if we need to get down the database route.
Cheers, Sascha
Hi Sascha,
Thank you.
I also came across the same article, but didn't go through it properly.
Yeah, I used space and '?' mark's while assigning a name for the template and I am regretting it now.
I have requested one of my server admins here to check the registry entry. Meanwhile can you please explain me how I can fix it the database way?
Appreciate your help.
Thank you,
Anthony.
Hey Anthony,
before you do anything please make a db backup (if you haven't done so already...)!
Were you able to locate the template you've created in the /Masterpages folder? If so, delete it (or move it somewhere else).
I haven't done this myself yet, so no guarantee. ;)
Let's get rid of the template first:
You should now be able to see the templates in Umbraco again. So let's finish off the document type:
The Document Types should now be browsable as well in Umbraco!
Let me know how it goes,
Sascha
is working on a reply...