Take the community feedback survey now.
Take the community feedback survey now.
 
                Due to the number in the path it figures it is a page folder even though it is not ?
I cannot find a reference to the error message "Unsaved page - A folder for this page isn't created..." in our code, I am just guessing that it has something to do with page folders which are in the format of /folder/number.
ok, but sorry to say that this info doesn't help us getting closer to solving our problem
No, but maybe you can help me out here. Is there a reason I cannot find the error message for example, is it the actual error message or something like it ? And are the folders in this format or not ?
Per, take a look at the link to the code, there is also a few screen shots displaying our problem.
The "folder" structure is loaded from a xml-file included in the codesample file.
 
    
    
    
We have an own Virtual Path Provider that shall fetch folders from an XML and files from a remote server based on an attribute on the folder.
Listing of the folders works fine, but when you go 2 steps down in the folder structure abd want's to go up episerver says "Unsaved page - A folder for this page isn't created..."
We can't find where the problem is, need assistance.
Directoris method in SampleDirectory.cs:
public override IEnumerable Directories { get { directoryXml = new XmlDocument(); directoryXml.Load(HttpContext.Current.Server.MapPath("~/App_Data/FileStore/FileStore.xml")); if (this.IsFirstLevel) { XmlNode startNode = directoryXml["filestore"]; _directories = new List<SampleDirectory>(); foreach (XmlNode folderNode in startNode.ChildNodes) { string virtualPath = VirtualPath + folderNode.Attributes["id"].Value + "/"; _directories.Add(new SampleDirectory(vpp, virtualPath)); } return _directories; } else { string[] folders = this.VirtualPath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); bool dirUpSelected = false; string[] formKeys = HttpContext.Current.Request.Form.AllKeys[14].Split('$'); if (formKeys[formKeys.Length - 1] == "DirectoryUpButton") { folders = this.Parent.VirtualPath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); dirUpSelected = true; } string parentFolder = folders[folders.Length - 1]; XmlNode startNode = directoryXml["filestore"].SelectSingleNode("//folder[@id=\"" + (parentFolder ?? "") + "\"]"); if (startNode == null) startNode = directoryXml["filestore"]; _directories = new List<SampleDirectory>(); foreach (XmlNode folderNode in startNode.ChildNodes) { string virtualPath = VirtualPath + folderNode.Attributes["id"].Value + "/"; if (dirUpSelected) virtualPath = this.Parent.VirtualPath; _directories.Add(new SampleDirectory(vpp, virtualPath)); } return _directories; } } } public override string Name { get { XmlNode node = GetXmlNode(VirtualPath); if (node == null) { return ""; } XmlAttribute name = node.Attributes["name"]; return name != null ? name.Value : base.Name; } } private XmlNode GetXmlNode(string virtualPath) { string[] folders = virtualPath.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); if (folders.Length == 0) { return null; } if (folders.Length == 1) { return directoryXml[folders[0]]; } return directoryXml.SelectSingleNode(string.Format("//folder[@id='{0}']", folders[folders.Length - 1])); }