Copied to clipboard

Flag this post as spam?

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


  • Chau 66 posts 97 karma points
    Sep 30, 2009 @ 17:52
    Chau
    0

    All of my templates disappeared

    Umbraco 4.x

    asp2.x

    windows server 2003, iis6.x

    mysql5.x

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    The given path's format is not supported.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NotSupportedException: The given path's format is not supported.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [NotSupportedException: The given path's format is not supported.]
       System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +7488435
       System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) +278
       System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +87
       System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, AccessControlActions control, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +46
       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) +637
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +65
       System.IO.StreamWriter.CreateFile(String path, Boolean append) +62
       System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +58
       System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +29
       System.IO.File.WriteAllText(String path, String contents, Encoding encoding) +59
       umbraco.cms.businesslogic.template.Template.SaveMasterPageFile(String masterPageContent) +1000
       umbraco.cms.businesslogic.template.Template.SaveAsMasterPage() +26
       umbraco.cms.businesslogic.template.Template.getMasterPageContent() +33
       umbraco.cms.businesslogic.template.Template.setupTemplate() +179
       umbraco.cms.businesslogic.template.Template.GetAllAsList() +172
       umbraco.cms.presentation.settings.editTemplate.Page_Load(Object sender, EventArgs e) +154
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    Fresh install >> Install Cretive Web Starter >> Tried to create template named "ECC: Master" >> got this error >> all nodes under template disappeared. they are still present under masterpages >> deleted contents of systemblahblahdontdelete >> rebuilt index >> same thing. no nodes showing under templates

    Any help is appreciated!

    Thanks

  • Chau 66 posts 97 karma points
    Sep 30, 2009 @ 17:57
    Chau
    0

    Performed a reinstall of the site via www.blahblah.com/install/ >> logged in >> same thing.

    This makes me think that it is now a database problem...

  • Chau 66 posts 97 karma points
    Sep 30, 2009 @ 18:03
    Chau
    0

    Also, just to confirm, I can create other nodes such as stylesheet, content, etc.

    Thanks.

  • Chau 66 posts 97 karma points
    Sep 30, 2009 @ 23:24
    Chau
    0

    Reinstalled by clearing out the folder and unzipping all the files again. Went through install process. Logged in and now all the nodes are empty. Tried to rebuild database.

    Anyone out there????

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Sep 30, 2009 @ 23:44
    Douglas Robar
    0

    The usual reason for people not responding is because no one is sure of the problem or the solution. Thus, I'll take a stab at it, though I've not experienced or heard of this particular issue before.

    First of all, the error "System.NotSupportedException: The given path's format is not supported." when you created a template of the name, "ECC: Master" sounds like the colon caused a problem. That's a guess, but there's no problem with spaces so the colon would be the obious issue. This would be worth double-checking and then filing a bug report on codeplex if it is repeatable.

    One question I would have is if this is unique to MySQL or also happens with SQL Server. It is possible it is unique to MySQL but then again it might be a general issue and not database-dependant.

    Having since played with the database (which is always dangerous to do directly rather than using the umbraco api), and then installed afresh means you no longer have the site you once had. The filesystem and the database create a team and you want to keep both together; replacing the files or twiddling the database is may well cause other issues.

    I'd recommend you create a new umbraco installation in a new folder and with a new database so that you can start again clean and fresh. Alternatively, if you've got backups of our database and files from before the error you could restore them.

     

    Let us know what you find out.

    cheers,
    doug.

     

  • Chau 66 posts 97 karma points
    Oct 01, 2009 @ 00:17
    Chau
    0

    I found the problem. When I tried to create a template I used a bad character. I tried making the template "xxx:xxxxxx". This threw the error and then forever tainted my database. Since it was a new site I just deleted the database and started over. It was the colon as you pointed out. How do I report this bug?

    Thank you so much for your input. I was just stressed. Lol.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 01, 2009 @ 10:50
    Douglas Robar
    0

    You should report all bugs to http://umbraco.codeplex.com

    cheers,
    doug.

  • Steven Wilber 103 posts 98 karma points
    Nov 20, 2009 @ 13:43
    Steven Wilber
    0

    Thanks Chau and Doug.

    I just hit the same problem. I created a new Document Type called 'Page: Generic' and left the 'create template' box ticked. Database screwed! It is the colon in the name.

    Again, luckily this was the first item that I created in this Umbraco installation, so having read this post I just rebuilt the database.

    Chau - did you report this bug?

     

    Cheers

    Steve

  • Thomas Enggaard Christensen 24 posts 49 karma points
    Dec 11, 2009 @ 23:36
    Thomas Enggaard Christensen
    1

    Hi.

    I just hit this issue today as well. Unfortunately reinstalling Umbraco was not an option as it was'nt a new site.

    To Douglas, this issue is not confined to MySQL, I'm running MS Server2008, with MSQL2008, Umbraco 4.0.1

    The good news however isthat i was able to fix the issue very easily.

    It IS the colon in template name that causes this.

    To fix it you need to modify the DB manualy.

    There are 2 tables you need to edit.

    Table: cmsTemplate
    Look for the name of the template you tried to create with a colon in it, most likely it wil lbe the last one. The column to look for is the "alias" column. Simply delete the colon in the alias of the template.

    Table: umbracoNode
    Again, locate the create template, the name of the template is in the "text" column. Remove the colon from that as well.

     

    When this is done, just right click the "Templates" node in "settings" tab, and reload nodes, and you good to go.

     

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 12, 2010 @ 12:35
    Lee Kelleher
    0

    Came across this problem for the first time today.  Created new doc-type with a colon in the title, ticked the create matching template - and big error. Following Enggaard's advice, removed the colon character directly from the "cmsTemplate" alias text did the trick! (I didn't need to change anything in the "umbracoNode" table).

    I notice this bug is fixed in the next version of Umbraco (v4.1), but it's good to know it's quickly fixable (if you have database access).

    Cheers, Lee.

  • Daniel Kolev 4 posts 24 karma points
    Feb 16, 2011 @ 14:11
    Daniel Kolev
    0

    I use version 4.6.1

    I have a template called Issue1Template and a document type Issue1DocumentType. Fallowing the naming  convention, I created document type Issue2DocumentType, and set to false (unckeck) the check box "Create matching template". When I hit "Create", Issue1Template disappeared, but the page that use it is online. I had only Issue2DocumentTemplate.

    This happens on each installation I made - from build zip from codeplex, and MS Web installer. I found lot articles about this on the net. I thought this bug is common on old version of Umbraco...

  • JDCuster 27 posts 159 karma points
    Jul 27, 2011 @ 04:31
    JDCuster
    0

    @Thomas Enggaard Christensen - thank you for your solution. That helped me get back on track.

    I can say with great certaintity that this issue still exists in 4.7. I tried to create a new Document Type with a colon in the name and everything went haywire. 

  • Fuji Kusaka 2203 posts 4220 karma points
    Jul 27, 2011 @ 04:45
    Fuji Kusaka
    0

    Hi All,

    I once came across this sudden disappearance of Document Type under v4.6 but didnt know why. I guess the same as you all are having now with some special characters but we quickly get it back by accessing the database and just restoring  it.

     

  • Funka! 398 posts 661 karma points
    Nov 02, 2011 @ 08:53
    Funka!
    0

    We had someone editing an existing template and put a slash ("/") in the template name or alias, which "broke" things in that all of the templates disappeared and all of the content nodes that had been using that template were now throwing yellow screens of death.

    To fix this, we found in the [cmsTemplate] table the row that had this bad name and renamed (updated the row) it back to what it used to be. This fixed everything in the back office like nothing had ever happened. (We then renamed the template again, but this time without using any funny characters, and it worked as expected.)

    Here is my thinking on what happened:

    1. We used to have a template called WidgetPage.
    2. The name and/or alias of this template was renamed to something that had an invalid char. The corresponding row in the database for this template was successfully updated, but the attempt to rename the physical ".master" file in the filesystem must have failed, leaving an inconsistent state.
    3. The exception from step #2 left an "orphan" row in the database (in the [cmsTemplate] table) that was no longer linked to its related physical file (since the physical file still had the old name, as it was never renamed as expected?)
    4. Loading certain parts of the backoffice fail because of this condition. Symptoms: the Templates node inside of the Settings section appears completely empty (all templates have disappeared); trying to edit existing documents (content nodes) that were using this template cause a YSOD.

    Here are some (amateur) suggestions on what may possibly be done to fix this:

     - The Umbraco back-office should filter more strictly on template names and/or aliases. For example, don't allow slashes, colons, or other "weird" characters. Anything that would upset the filesystem should not be allowed here!
     - Any exceptions that occur in the step where renaming existing templates (master pages) in the filesystem or creating new ones could be caught and possibly rolled back in the database so they can be tried again?
     - Other parts of the Umbraco back-end could be made more tolerant to this particular error condition. For example, instead of a YSOD when you try to edit a content node, an error message like "there was a problem loading the site templates" could be displayed; or, the Templates branch in the Settings section might still load the rest of the templates that did *not* have any errors (instead of being blank) and possibly again stating or alerting the error condition.

    Again, these are just my amateur suggestions. I would ideally have more time to crack open the source and offer more help, but this at least might catch some attention and be addressed sooner than that? For now, we will just make sure to train ourselves to be careful of this when naming/renaming templates!!

    Thank you!

     

Please Sign in or register to post replies

Write your reply to:

Draft