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.
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.
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: }
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.
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
Not much to add but I'm experiencing the exact same behaviour... must likely triggered by upgrading Umbraco to 6.2.1.
I solved it with http://our.umbraco.org/projects/backoffice-extensions/udatefoldersy udatefoldersy package.
Thanks alot Dan... I'll use that package instead.
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!
Try just commenting out the line:
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
How do you comment out this line? I guess you need the source file, but where do you put it?
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
This fix worked fine for me on v6.2.3 - thanks John.
Is't possible to made a fix or a patch?
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 :(
I used uDateFoldersy and it worked perfect.
Thanks Dan.
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.
Has no one compiled a fixed version that we can swap in?
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.is working on a reply...