Hi I'm using Datefolder 1.4 on a Umbraco 4.7.1.1 installation, Everything seems to be working except, everytime I publish an item I get this error: "Datefolders OrderChildrenByName exception input string was not in a correct format."
But my content gets published and the datefolder sorts it correctly to the right year and month folders, and the folders are created in alphabetical order.
I was getting this error on 4.7.1.1 and things were still publishing fine.
It seems the error is being caused because there is one or more non-orderable nodes under the root node. So for example, I have a node called Events under which I create Event nodes that I want automatically moving into date folders. The error in my case was being caused because I had a non-Event node under the Events parent node.
Each time I add an Event, Umbraco tries to order it against the existing Events and the Non-Event which it obviously can't.
So I guess a solution is to remove the non-date-orderable node.
I am using 4.7.2 I have a doc type called notifications in which I create a notification which is different doc type. When I first create notification item in notifications folder all works fine. So i get date folders 2012 (1) > 11 > 05 when i create another item in notifications folder I also get error
DateFolders OrderChildrenByName exception
Any ideas? I dont have another other doc types in the notifications folder. In fact you can only create notification.
I was looking through the code for the new Version 2 code (which uses v6 API) and noticed this in the OrderChildrenByName method (which still throws this exception)
var orderedChildren = parent.Children().Where(c => !int.TryParse(c.Name, out i)).OrderBy(x => int.Parse(x.Name)).ToList();
It looks to me like there should't be the ! before the first int.TryParse()
Removing it seems to fix this error:
var orderedChildren = parent.Children().Where(c => int.TryParse(c.Name, out i)).OrderBy(x => int.Parse(x.Name)).ToList();
Datefolders OrderChildrenByName exception
Hi I'm using Datefolder 1.4 on a Umbraco 4.7.1.1 installation, Everything seems to be working except, everytime I publish an item I get this error: "Datefolders OrderChildrenByName exception input string was not in a correct format."
But my content gets published and the datefolder sorts it correctly to the right year and month folders, and the folders are created in alphabetical order.
Any ideas to fix it?
Hi, I'm also getting the same error on a Umbraco 4.7.1.1 - would also really welcome ideas on how to fix it. Thankyou!
I was getting this error on 4.7.1.1 and things were still publishing fine.
It seems the error is being caused because there is one or more non-orderable nodes under the root node. So for example, I have a node called Events under which I create Event nodes that I want automatically moving into date folders. The error in my case was being caused because I had a non-Event node under the Events parent node.
Each time I add an Event, Umbraco tries to order it against the existing Events and the Non-Event which it obviously can't.
So I guess a solution is to remove the non-date-orderable node.
Thanks McIntyre, I went through my datefolders, and I found a node there that was not supposed to be there, deleting it solved the problem
Guys,
I am using 4.7.2 I have a doc type called notifications in which I create a notification which is different doc type. When I first create notification item in notifications folder all works fine. So i get date folders 2012 (1) > 11 > 05 when i create another item in notifications folder I also get error
DateFolders OrderChildrenByName exception
Any ideas? I dont have another other doc types in the notifications folder. In fact you can only create notification.
Regards
Ismail
I'm not sure if this has anything to do with your issue but at least one version of datefolders did a publish on the new event.
Just a guess but could be an issue with that in 4.7.2?
Download the datefolders source, put it in the solution and debug.
I was looking through the code for the new Version 2 code (which uses v6 API) and noticed this in the OrderChildrenByName method (which still throws this exception)
It looks to me like there should't be the ! before the first int.TryParse()
Removing it seems to fix this error:
Thanks Dan. This has now been corrected
is working on a reply...