I think I tried to create a template with a "?" in it. I think that's what botched things up. Umbraco is the CMS used for a client I edit there website in. I create the HTML markup file in Dreamweaver then put it all in Umbraco once the pages are approved; so I'm not super familiar with Umbraco, plus the website is hosted on their server and I'd need to talk to their IT to get a better idea on what kind of database they are running. What are my options to fix the problem so I can relay the message?
Are you constantly getting this error or just when trying to create a template? I would just try recreating the template without the question mark to get around the issue.
Also, if you can reproduce this, it would probably be a good idea to report as a bug - ideally we should have a better error message explaining the situation, or a mechanism to prevent the user from entering bad characters :)
I'm constantly getting the error and am unable to create any further templates unfortunately, the folder contents disappears. Also when I click on any of the "Document Types" I get the same error.
If you expand the Templates tree, are you able to see that bad template? If you can, you could try clicking it and changing the name (not sure this will work or not).
I think the only other option might be to manually edit the database. If you look in the cmsTemplate table, you should be able to find the one with the bad character and change the 'alias' field to remove the bad character. Make sure to back up your database first.
I think your only option is to edit the database as I mentioned above. Luckily it should be a simple process, just make sure to backup your site first. Let us know if you need help with this part.
Got an error CAN'T CREATE TEMPLATES!!!!
I got this error and can no longer create templates in Umbraco. How do I fix this?
[ArgumentException: Illegal characters in path.]
System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str) +10069545
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +95
System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, AccessControlActions control, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +74
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +2095
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +98
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +139
System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +17
System.IO.File.WriteAllText(String path, String contents, Encoding encoding) +60
umbraco.cms.businesslogic.template.Template.SaveMasterPageFile(String masterPageContent) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:538
umbraco.cms.businesslogic.template.Template.SaveAsMasterPage() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:379
umbraco.cms.businesslogic.template.Template.getMasterPageContent() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:149
umbraco.cms.businesslogic.template.Template.setupTemplate() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:136
umbraco.cms.businesslogic.template.Template..ctor(Guid id) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:61
umbraco.cms.businesslogic.template.Template.GetAllAsList() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\cms\businesslogic\template\Template.cs:326
umbraco.settings.EditContentTypeNew.bindTemplates() in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\settings\EditNodeTypeNew.aspx.cs:40
umbraco.settings.EditContentTypeNew.Page_Load(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\umbraco\settings\EditNodeTypeNew.aspx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
umbraco.BasePages.BasePage.OnLoad(EventArgs e) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\businesslogic\BasePages\BasePage.cs:287
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
Hi Phillip,
What was the name of the template you were trying to create? Per the error it seems maybe there was a bad character in it (non-alphanumeric)?
Are you able to create other items such as XSLT or Razor files?
-Tom
I think I tried to create a template with a "?" in it. I think that's what botched things up. Umbraco is the CMS used for a client I edit there website in. I create the HTML markup file in Dreamweaver then put it all in Umbraco once the pages are approved; so I'm not super familiar with Umbraco, plus the website is hosted on their server and I'd need to talk to their IT to get a better idea on what kind of database they are running. What are my options to fix the problem so I can relay the message?
Thanks
P
Hi Phillip,
Are you constantly getting this error or just when trying to create a template? I would just try recreating the template without the question mark to get around the issue.
Also, if you can reproduce this, it would probably be a good idea to report as a bug - ideally we should have a better error message explaining the situation, or a mechanism to prevent the user from entering bad characters :)
-Tom
I'm constantly getting the error and am unable to create any further templates unfortunately, the folder contents disappears. Also when I click on any of the "Document Types" I get the same error.
Gotcha.
If you expand the Templates tree, are you able to see that bad template? If you can, you could try clicking it and changing the name (not sure this will work or not).
I think the only other option might be to manually edit the database. If you look in the cmsTemplate table, you should be able to find the one with the bad character and change the 'alias' field to remove the bad character. Make sure to back up your database first.
-Tom
When I click the "Templates" tree to toggle down the doggle disappears and the folder marked Templates shows no content. :(
Yeah, I was afraid of that.
I think your only option is to edit the database as I mentioned above. Luckily it should be a simple process, just make sure to backup your site first. Let us know if you need help with this part.
-Tom
is working on a reply...