Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 629 posts 1016 karma points
    Jun 24, 2014 @ 11:58
    Dan Evans
    0

    Duplicate nested date folders

    When I create a new item 2 sets of date folders are created and the item is put inside, e.g.

    2014/06/24/2014/06/24

    Running 6.1.6

    Thanks

  • Michael Hyldsgaard 64 posts 124 karma points
    Jun 30, 2014 @ 13:35
    Michael Hyldsgaard
    0

    Not much to add but I'm experiencing the exact same behaviour... must likely triggered by upgrading Umbraco to 6.2.1.

  • Dan Evans 629 posts 1016 karma points
    Jul 04, 2014 @ 11:58
    Dan Evans
    2

    I solved it with http://our.umbraco.org/projects/backoffice-extensions/udatefoldersy udatefoldersy package.

     

  • Michael Hyldsgaard 64 posts 124 karma points
    Jul 04, 2014 @ 12:20
    Michael Hyldsgaard
    0

    Thanks alot Dan... I'll use that package instead.

  • Nigel 29 posts 52 karma points
    Jul 10, 2014 @ 12:44
    Nigel
    0

    Had the same issue. Removing the package and then installing again fixed it for me after upgrading from 6.1.6 > 6.2.1

    No logic to it I'm afraid!

     

     

     

  • John Walker 41 posts 136 karma points
    Jul 28, 2014 @ 10:16
    John Walker
    3

    Try just commenting out the line:

    ContentService.Created += Document_New;

    I had the exact same issue since installing on a 6.2.1. My guess is that the created event now also fires the saved event which was causing some sort of duplication.

     

    John

  • Stan 2 posts 22 karma points
    Aug 04, 2014 @ 11:24
    Stan
    0

    How do you comment out this line? I guess you need the source file, but where do you put it?

  • John Walker 41 posts 136 karma points
    Aug 04, 2014 @ 11:29
    John Walker
    0

    Yeah just grab the latest source file from the downloads and put that in your App_Code folder, update the line I mentioned then make sure you remove the InfoCaster.Umbraco.DateFolders.dll from your bin folder as thats the compiled version of the DateFolders class.

     

    John

  • Adam Maidment 54 posts 163 karma points
    Oct 03, 2014 @ 15:21
    Adam Maidment
    0

    This fix worked fine for me on v6.2.3 - thanks John.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Jan 30, 2015 @ 15:56
    Biagio Paruolo
    0

    Is't possible to made a fix or a patch?

  • Mitra 81 posts 196 karma points
    Feb 17, 2015 @ 12:41
    Mitra
    0

    It doesn't work for me.

    I installed the package (DateFolders_2.1.1.zip) and i put the sourse file to app-code folder. comment out the line John had mentioned:

    public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)

            {

                if (itemDocType == null || itemDocType.Length <= 0 || string.IsNullOrEmpty(dateFolderDocType)) return;

                // ContentService.Created += Document_New;

                ContentService.Saved += Document_AfterSave;

                ContentService.Trashing += Document_BeforeMoveToTrash;

                ContentService.Trashed += Document_AfterMoveToTrash;

            }

     

    but still i get error:

    String or binary data would be truncated.
    The statement has been terminated.

    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.Data.SqlClient.SqlException: String or binary data would be truncated.
    The statement has been terminated.

    Source Error: 

    Line 163:            var node = parent.Children().FirstOrDefault(x => x.ContentType.Alias == dateFolderDocType && x.Name.Equals(nodeName)) ??
    Line 164:                       contentService.CreateContent(nodeName, parent, dateFolderDocType, currentUserId);
    Line 165: if(!node.Published) contentService.SaveAndPublish(node, currentUserId); Line 166:            return node;
    Line 167:        }


    Source File: c:\inetpub\wwwroot\Transactor\App_Code\DateFolders_2.1.1.cs    Line: 165 

     

    and it makes mulitipe nested date folders :(

  • Mitra 81 posts 196 karma points
    Feb 17, 2015 @ 13:08
    Mitra
    0

    I used uDateFoldersy and it worked perfect. 

    Thanks Dan.

  • Liam 22 posts 158 karma points
    Oct 20, 2015 @ 14:34
    Liam
    0

    John's fix worked for me.

    Uninstalled DateFolders package from Developer section (or simply rename InfoCaster.Umbraco.DateFolders.dll extension to .BACKUP or whatever.)

    Commented out the line John mentioned in the source and dropped it in /App_Code/ folder

    Thanks.

  • Connie DeCinko 931 posts 1160 karma points
    Jan 07, 2016 @ 15:44
    Connie DeCinko
    0

    Has no one compiled a fixed version that we can swap in?

  • Matthew Wise 271 posts 1373 karma points MVP 4x c-trib
    Mar 08, 2016 @ 10:35
    Matthew Wise
    0

    Hi Guys,

    I have finally had time, to look at this within business hours, I have pushed a new version (2.1.2) with Document_New removed and also fixed a sort issues raised in another post.

Please Sign in or register to post replies

Write your reply to:

Draft