Copied to clipboard

Flag this post as spam?

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


  • Adriano Fabri 469 posts 1633 karma points
    Sep 30, 2009 @ 16:06
    Adriano Fabri
    0

    Error during creation of a news.

    Hi,
    I have a problem with your AutoFolders package.
    I'm using:
    Umbraco v4.0.2.1
    Asp.net v.2.0
    Windows Vista with IIS7
    Stacktrace: at the end of this post
    AutoFolders v1.2

    The autofolders.config file is:

    <?xml version="1.0" encoding="utf-8" ?>
    <Settings>
         <FolderProviders>
              <FolderProvider alias="DataFolder
                                        assembly="/bin/AutoFolders"
                                         type="AutoFolders.Providers.DateFolderProvider">
                   <Property alias="FolderDocType">News</Property>
                   <Property alias="YearFormat">yyyy</Property>
             </FolderProvider>
         </FolderProviders>
         <DocTypes>
              <DocType alias="NewsItem" folderProvider="DataFolder"/>
         </DocTypes>
    </Settings>

    I created a node called "News" (doctype "News")
    This node will contain all the "NewsItems" (doctype "NewsItem")
    When I create a new NewsItem, automatically AutoFolders must create a folder with the year as name and move the NewItems into this folder.
    Well...When I try to do this, I receive this error:

    Object reference not set to an instance of an object.
    System.NullReferenceException: Object reference not set to an instance of an object.

    Stack:
    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.cms.businesslogic.web.Document.XmlPopulate(XmlDocument xd, XmlNode& x, Boolean Deep) +620
       umbraco.cms.businesslogic.web.Document.XmlGenerate(XmlDocument xd) +62
       umbraco.cms.businesslogic.CMSNode.Move(Int32 NewParentId) +530
       AutoFolders.ApplicationBase.Document_New(Document sender, NewEventArgs e) +247
       umbraco.cms.businesslogic.web.Document.OnNew(NewEventArgs e) +27
       umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) +980
       umbraco.contentTasks.Save() +61
       umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +344
       umbraco.cms.presentation.create.controls.content.doCreation() +147
       umbraco.cms.presentation.create.controls.content.sbmt_Click(Object sender, EventArgs e) +5
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

    Can you help me please?
    Thank you
    Adriano

  • Chris Koiak 700 posts 2626 karma points
    Sep 30, 2009 @ 17:43
    Chris Koiak
    0

    Hi Adriano,

    Month format is not optional. You need to choose and include a month format

    <Property alias="MonthFormat">MM</Property>

    Hope this helps,

    Chris

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies