Copied to clipboard

Flag this post as spam?

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


  • Allan Hawkey 232 posts 303 karma points
    Sep 05, 2011 @ 20:15
    Allan Hawkey
    0

    2.0 beta - create post from dashboard error

    In umbraco 4.7 installation with uBlogsy 2.0 beta, I tried creating a blog post from the dashboard - in a blog I'd set up beneath my site's home page.  This gave the following error:

    Server Error in '/' Application.

    Year, Month, and Day parameters describe an un-representable DateTime.

    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.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.

    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:

    [ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.]
       System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day) +9397906
       System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second, Int32 millisecond) +48
       uBlogsy.BusinessLogic.DateFolderService.EnsureCorrectDate(Document doc) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy.BusinessLogic\DateFolderService.cs:112
       uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterMove(Object sender, MoveEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:163
       System.EventHandler`1.Invoke(Object sender, TEventArgs e) +0
       umbraco.cms.businesslogic.CMSNode.FireAfterMove(MoveEventArgs e) +27
       umbraco.cms.businesslogic.CMSNode.Move(CMSNode parent) +1161
       umbraco.cms.businesslogic.CMSNode.Move(Int32 newParentId) +40
       uBlogsy.BusinessLogic.DateFolderService.EnsureCorrectParentForPost(Document doc) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy.BusinessLogic\DateFolderService.cs:145
       uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterSave(Document sender, SaveEventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy.BusinessLogic\EventHandlers\UmbracoEventHandlers.cs:82
       umbraco.cms.businesslogic.web.SaveEventHandler.Invoke(Document sender, SaveEventArgs e) +0
       umbraco.cms.businesslogic.web.Document.FireAfterSave(SaveEventArgs e) +27
       umbraco.cms.businesslogic.web.Document.Save() +180
       umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) +907
       uHelpsy.Core.UmbracoAPIHelper.CreateContentNode(String nodeName, String nodeTypeAlias, Dictionary`2 properties, Int32 parentId, Boolean publish) +97
       uBlogsy.BusinessLogic.PostService.CreatePost(Int32 documentId) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy.BusinessLogic\PostService.cs:85
       uBlogsy.Web.usercontrols.uBlogsy.dashboard.CreatePost.btnSubmit_Click(Object sender, EventArgs e) in D:\_PROJECTS\uBlogsy - Blog\Branches\2.0_comment_subscription\uBlogsy\uBlogsy\usercontrols\uBlogsy\dashboard\CreatePost.ascx.cs:67
       System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +113
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
    

    The same happens when trying to post from the dashboard to the "My Blog" included with the package.

    Any idea what's wrong here?

    Thanks
    Allan

  • Allan Hawkey 232 posts 303 karma points
    Sep 05, 2011 @ 20:48
    Allan Hawkey
    0

    Same error also arises when changing the date of a post in the date folders to a new date - seems that there's a problem with creating new date folders.  When I reload nodes, I have a blank month / day folder where it seems to have aborted part-way through the process.

    I did have Auto Sort installed - I've uninstalled that, and now I can create posts from the dashboard (I guess there was a conflict there?), but it still does not work from within the tree and I can't move posts from one date to another.

    Hope this helps
    Allan

  • Allan Hawkey 232 posts 303 karma points
    Sep 12, 2011 @ 18:53
    Allan Hawkey
    0

    Still having problems with this - a bit more info though...  When creating a post from the dashboard, it all works fine if all the date folders already exist (year, month, day).  But if not, then the error arises.

    The same is true within the tree - if I manually create the date folders (year, month, day) and then create a post under the day folder, it's fine.  But if I try to create a post for a date which doesn't yet have full date folders created, the error arises.  The same is true if I try to change the date to a date where the date folders aren't all present.

    Creating a new post by either method does actually create a post, and also a date folder - both are visible after reloading the nodes.  The datefolder(s) is/are un-named / blank (presumably why the erros is triggered) and the post date in the post is empty (presumably causing the date folder to be blank?).

    Allan

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 13, 2011 @ 23:31
    Anthony Dang
    0

    Hi

    Have you removed any properties?

    Can you show me a screen shot of your content tree.

    My only other thought is regionalized date time which I thought I took care of. What region is your computer set to?

     

  • Allan Hawkey 232 posts 303 karma points
    Sep 14, 2011 @ 11:08
    Allan Hawkey
    0

    Just wrote an update on this, which seems to have been lost when I submitted it!  Anyway, here goes again...

    I did a clean install of uBlogsy 2.0 beta on a fresh installation of Umbraco 4.7 - and everything worked fine.  So that would seem to eliminate the regionalised date time.

    I then checked the properties on the clean install vs the properties on the installation where I'm having the problems - all the properties were present.

    I then went to the landing page / general settings tab and adjusted the month and day format settings to match the site which is giving me problems.  And the issue recurred.  So it's clearly something to do with these.

    I had a look in the database to see if that showed what's going on.  It does.  In the dbo.csmPropertyData table, for the clean installation before any changes, the month field is set to 30 and the day field is set to 35.  That's when it works ok.

    When saving the landing page, without changing the month / day format folders (by default neither radio button appears to be selected), the records in the database are cleared and show NULL.  That's when the errors start - when both fields are NULL, the month and day folders created are both blank and the error is shown.

    When the day and month formats ARE set, the options are 39-40 (day) and 45-48 (month) - but the defaults on installation (which work) are 35 and 30 respectively.  So it looks like the settings aren't matched up correctly?  Perhaps a result of the recoding for v2.0?

  • Allan Hawkey 232 posts 303 karma points
    Sep 14, 2011 @ 11:38
    Allan Hawkey
    0

    OK - so if I change the database for the main site where I was having this issue originally to show 30 and 35 for the month and day fields, then it seems to work.  But of course when I (or a user) edits the settings on the landing page, the error will recur.

    It seems that the processes which create the folders are looking for IDs which match 30 and 35 (or presumably other options in that range from where this was originally set up).  But when the package is installed on an existing site, the values assigned to the options for the Day Format and Month Format data types will be different.  This seems to be the cause of the problem.

    I'll disable editing the landing page for now, until this is fixed.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 16, 2011 @ 23:22
    Anthony Dang
    0

    Nice investigating.

    This is due to the radio button list which is an umbraco datatype. I was under the assumption that the values umbraco gave to each item would remain the same when the datatype was installed.

    If it is true that they change then that is annoying and i'll have to write my own datatype to do that configuration. Unless you suggest a better way?

     

     

     

  • Allan Hawkey 232 posts 303 karma points
    Sep 17, 2011 @ 10:29
    Allan Hawkey
    0

    I think it's inevitable that the value of the items in the datatype will change for each (existing) installation, as the values seem to be assigned on a sequential basis.  So if an installation has a different number of values already set up compared to yours setup, then this difference will arise.  In my installation attempts, the numbers vary from case to case, depending on what else is installed.

    So yes, a custom datatype is probably needed.

    As a short term fix, and rather than preventing any edits to the landing page, I've just replaced the datatypes for the month and day type fields with numeric fields which I've set manually to 30 / 35.  Of course, this doesn't look great to users and it doesn't give them the other day/month options, but it does work!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Sep 23, 2011 @ 00:20
    Anthony Dang
    0

    Damn that is really annoying.... i'll have to write my own radiobutton list datatype i guess.

     

  • Nadia 45 posts 122 karma points
    Nov 16, 2011 @ 03:18
    Nadia
    0

    Hey, 

    I getting this same error. Even when I put in the Month and Day Manually with integers it still occuring. Has anyone got any other work arounds? 

    Or can I get the source code, so I can manually set for now?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Nov 16, 2011 @ 11:58
    Anthony Dang
    0

    Are you on beta or beta 2?

    beta 2 fixes this issue.

  • Nadia 45 posts 122 karma points
    Nov 16, 2011 @ 20:59
    Nadia
    0

    oh cheers, I missed that released. 

    Thanks

    FYI, I'm loving uBlogsy it is pretty much exactly what I need :)

  • Allan Hawkey 232 posts 303 karma points
    Nov 17, 2011 @ 01:07
    Allan Hawkey
    0

    What's changed from beta to beta 2, and what's the safest way to upgrade from one to the other - is it just a case of overwriting some files in the bin?  If so, which?

    Thanks
    Allan

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Nov 17, 2011 @ 01:29
    Anthony Dang
    0

    Dlls will do it.

    It's just bug fixes. Make sure that you have not renamed the month and day format datatype values.

     

  • Allan Hawkey 232 posts 303 karma points
    Nov 19, 2011 @ 12:53
    Allan Hawkey
    0

    Thanks Anthony - that seems to have cured quite a few things.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Nov 19, 2011 @ 14:51
    Anthony Dang
    0

    Sweet.

    Please let me know if you have any more issues. The sooner the bugs get ironed out of 2.0, the sooner it will be in release :)

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft