i tried implementing it in a current site we are building, just to test it and use it if it works as we want to. the description seems to be more than enough for the needs of this current site.
though i have a little trouble implementing it.
for our own convenience we want to store news and events in a date folder structure... but for some xslts's we want to devide them into 2 groups, instead of using the same document types for the datefolders. so first step, i created 2 doctypes: - News Date Folder (NewsDateFolder) -- [added as allowed child on the news container doctype, and has NewsArticle as allowed childtype] - Event Date Folder (EventDateFolder) -- [added as allowed child on the events container doctype, and has Event as possible allowed child]
then, i installed your package and started configurating your config file where i added the following doctypes
i think i did this the way it has to be done... i removed the dayformat for both, i named the folderprovider alias to the ones i use in the doctypes and i added the folderdoctype to the ones i created in umbraco.
now the result of all this is:
when i right click on the newscontainer, and create a newsArticle, it gives a null reference error, in the create window, i saw that he did create a few items but not all of them are shown, for example if i added newsDateFolder manually for 2009, he named it: 2009 (1) so meaning a 2009 is already present, though not visible (not even with refreshing the tree) so i suppose due to the null reference error it didn't get to finish his logic ...
anyway, if you see any big mistakes i did, i would be glad to learn about them, however if we do not find a solution to this soon we will just use the other datefolder package which we already used in sites before (and experiment with this one further before adding it into production environements)
1) yes they support themself as childnodes... 2) they are copy pasted from the umbraco settings section so i believe the spelling cannot be an issue in this case 3) i cannot say if it exists for the events, as i removed everything for events because i had to test other code and i needed to be able to create new events for that. i will put it back tomorrow and see if it remains the same for events.
the null reference exception goes like this:
Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.businesslogic.web.Document.XmlPopulate(XmlDocument xd, XmlNode& x, Boolean Deep) +2276 umbraco.cms.businesslogic.web.Document.XmlGenerate(XmlDocument xd) +141 umbraco.cms.businesslogic.CMSNode.Move(Int32 NewParentId) +1280 AutoFolders.ApplicationBase.Document_New(Document sender, NewEventArgs e) +471 umbraco.cms.businesslogic.web.Document.OnNew(NewEventArgs e) +129 umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) +1974 umbraco.contentTasks.Save() +216 umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +1131 umbraco.cms.presentation.create.controls.content.doCreation() +379 umbraco.cms.presentation.create.controls.content.sbmt_Click(Object sender, EventArgs e) +58 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +130 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +139 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +38 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3214
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Event handler kicks in and creates the child folder nodes.
The original page is moved to the new location.
It would appear that the final step is failing. This may be due to incorrect params being passed to the umbraco move command.
Can you try disabling the plugin (del the dll), creating some NewsDateFolders and then moving a newsarticle between these folders. Trying to rule out move permission issues.
If that fails you'll need to create a debug build from the code and inspect the move parameters for correctness.
If that fails, I'll rebuild a new version with better error handling and reporting..... some point tomorrow.
no, we have a clean install, no packages other than imagegen and xsltsearch are added besides your autoform so it is no conflict between other handles. (as we also didnt write any handlers ourself yet too...)
and without the package installed (dll removed, and config commented or moved outside of umbraco dir) the creation of nodes works perfect, can make datefolders then add news articles underneath, etc... move them around also.
anyway, it is not that this package is bad, i believe it is very promissing, but at this point i do not plan to add it into this project again since we are already running behind on schedule i will keep the package and test around with it in my personal time first before trying to implement it right away.
thanks for the help and i will get back to this thread if i stumble on implementation problems in the test project then. (since i want to know what the problem is i will create a backup of this project so far and use that as the test project, want the parameters to be exactly the same as we have them now.)
Issues with creation of new nodes.
Hi,
i tried implementing it in a current site we are building, just to test it and use it if it works as we want to.
the description seems to be more than enough for the needs of this current site.
though i have a little trouble implementing it.
for our own convenience we want to store news and events in a date folder structure... but for some xslts's we want to devide them
into 2 groups, instead of using the same document types for the datefolders. so first step, i created 2 doctypes:
- News Date Folder (NewsDateFolder) -- [added as allowed child on the news container doctype, and has NewsArticle as allowed childtype]
- Event Date Folder (EventDateFolder) -- [added as allowed child on the events container doctype, and has Event as possible allowed child]
then, i installed your package
and started configurating your config file where i added the following doctypes
after that i duplicated the existing provider and named them according to the (news... and event...)
i think i did this the way it has to be done... i removed the dayformat for both, i named the folderprovider alias to the ones i use in the doctypes
and i added the folderdoctype to the ones i created in umbraco.
now the result of all this is:
when i right click on the newscontainer, and create a newsArticle, it gives a null reference error, in the create window,
i saw that he did create a few items but not all of them are shown, for example if i added newsDateFolder manually for 2009, he named it:
2009 (1) so meaning a 2009 is already present, though not visible (not even with refreshing the tree) so i suppose due to the null reference error it didn't get to finish his logic ...
anyway, if you see any big mistakes i did, i would be glad to learn about them, however if we do not find a solution to this soon we will just use the other datefolder package which we already used in sites before (and experiment with this one further before adding it into production environements)
Sander
Hi Sander,
You seem to have correct settings files.
A few things to check...
Can you post the null pointer error?
Finally, try building the code in debug and tell me the object that's null.
Cheers,
Chris
hi,
1) yes they support themself as childnodes...
2) they are copy pasted from the umbraco settings section so i believe the spelling cannot be an issue in this case
3) i cannot say if it exists for the events, as i removed everything for events because i had to test other code and i needed to be able to create new events for that. i will put it back tomorrow and see if it remains the same for events.
the null reference exception goes like this:
Server Error in '/' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
The logic works as follows...
It would appear that the final step is failing. This may be due to incorrect params being passed to the umbraco move command.
Can you try disabling the plugin (del the dll), creating some NewsDateFolders and then moving a newsarticle between these folders. Trying to rule out move permission issues.
If that fails you'll need to create a debug build from the code and inspect the move parameters for correctness.
If that fails, I'll rebuild a new version with better error handling and reporting..... some point tomorrow.
another think to check...you don't have any other event handler code running?
This may be included in other packages like blog4umbraco, etc...
no, we have a clean install, no packages other than imagegen and xsltsearch are added besides your autoform so it is no conflict between other handles. (as we also didnt write any handlers ourself yet too...)
and without the package installed (dll removed, and config commented or moved outside of umbraco dir)
the creation of nodes works perfect, can make datefolders then add news articles underneath, etc... move them around also.
anyway, it is not that this package is bad, i believe it is very promissing, but at this point i do not plan to add it into this project again since we are already running behind on schedule i will keep the package and test around with it in my personal time first before trying to implement it right away.
thanks for the help and i will get back to this thread if i stumble on implementation problems in the test project then. (since i want to know what the problem is i will create a backup of this project so far and use that as the test project, want the parameters to be exactly the same as we have them now.)
Sander
Sander,
Can you email me your test backup/install as I'm keen to get to the bottom of this. Feel free to blank any branding/client/template info.
chris no_spaces koiak {{at}} g mail
Cheers,
Chris
Hi Sander,
I've just used this package again in another project, hoping to encounter the issues you have, but it worked fine. Damn!
Please send me your install so I can replicate and fix this issue.
Cheers,
Chris
is working on a reply...