Copied to clipboard

Flag this post as spam?

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


  • Bjarni 7 posts 28 karma points
    Feb 24, 2012 @ 18:05
    Bjarni
    0

    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?

  • James Drever 118 posts 149 karma points
    Feb 29, 2012 @ 11:43
    James Drever
    0

    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!

  • Kieron McIntyre 116 posts 359 karma points
    Mar 06, 2012 @ 17:06
    Kieron McIntyre
    1

    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. 

  • Bjarni 7 posts 28 karma points
    Mar 07, 2012 @ 15:04
    Bjarni
    0

    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

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Nov 05, 2012 @ 15:25
    Ismail Mayat
    0

    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

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Nov 05, 2012 @ 18:18
    Anthony Dang
    0

    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.

     

  • Dan Diplo 1554 posts 6205 karma points MVP 5x c-trib
    Sep 11, 2013 @ 22:28
    Dan Diplo
    0

    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();
  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Sep 12, 2013 @ 09:18
    Matthew Wise
    0

    Thanks Dan. This has now been corrected

Please Sign in or register to post replies

Write your reply to:

Draft