Copied to clipboard

Flag this post as spam?

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


  • suzyb 474 posts 932 karma points
    Aug 17, 2011 @ 19:25
    suzyb
    0

    Error when publishing posts

    I'm getting an exception when publishing a post for the first time (similar to this thead). I've tried following the steps mentioned in that thread but it hasn't solved the problem.  The comments folder is getting created but the publish isn't finishing as the page is not available on the site.

    Version of umbraco is 4.7 and it happens on both my localhost (Win 7, IIS 7.5) and our dev server which I think is IIS 6.

    Value cannot be null.
    Parameter name: attribute

    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.ArgumentNullException: Value cannot be null.
    Parameter name: attribute

    Stack Trace:

    [ArgumentNullException: Value cannot be null.
    Parameter name: attribute]
       System.Xml.Linq.XAttribute.op_Explicit(XAttribute attribute) +163158
       UmbracoExamine.UmbracoContentIndexer.ReIndexNode(XElement node, String type) +193
       Examine.ExamineManager._ReIndexNode(XElement node, String type, IEnumerable`1 providers) +93
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.UpdateDocumentCache(Document d) +1112
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +122
       uHelpsy.Core.UmbracoAPIHelper.UpdateContentNode(Document doc, Dictionary`2 properties, Boolean publish) +221
       uHelpsy.Core.UmbracoAPIHelper.CreateContentNode(String nodeName, String nodeTypeAlias, Dictionary`2 properties, Int32 parentId, Boolean publish) +206
       uBlogsy.Web.Extensions.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) +634
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +1578
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +414
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +187
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +165
  • suzyb 474 posts 932 karma points
    Aug 19, 2011 @ 20:28
    suzyb
    0

    A colleague managed to fix the bug.  I'll post the solution here for anyone having this problem in the future.

    He changed this code in the Document_AfterPublish event handler in uBlogsy.Web.Extensions.UmbracoExtensions

    commentsFolder = UmbracoAPIHelper.CreateContentNode("Comments", "uBlogsyFolderComment", properties, sender.Id, true);
    umbraco.library.UpdateDocumentCache(sender.Id);
    umbraco.library.UpdateDocumentCache(commentsFolder.Id);

    to this

    umbraco.library.UpdateDocumentCache(sender.Id);
    commentsFolder = UmbracoAPIHelper.CreateContentNode("Comments", "uBlogsyFolderComment", properties, sender.Id, true);
    umbraco.library.UpdateDocumentCache(commentsFolder.Id);


  • Doug Mackay 56 posts 155 karma points
    Aug 19, 2011 @ 22:24
    Doug Mackay
    0

    Just to expand on what suzyb has posted.

    This bug only appears when you're using Examine and have set-up another IndexSet (see http://www.farmcode.org/post/2011/03/15/Searching-Umbraco-using-Razor-and-Examine.aspx for the minimum config to set-up a new Examine index).

    What appears to happen in the Document_AfterPublish event handler is :-

    • UmbracoAPIHelper.CreateContentNode gets called to create the comments folder
    • This has a call to UpdateDocumentCache (to add the comments folder) however at this point the comments folder parent (the blog post) hasn't been added to the document cache so this fails. The umbraco api logs ''Couldn't find any page with the nodeId = 0. This is most likely caused by the page isn't published!  Parameter name: nodeId' in the database.
    • The new Examine IndexSet causes an event handler to subscribe to the AfterUpdateDocumentCache event. This tries to access properties that should be in the cache but aren't due to the above error - this crashes and causes the ysod

    It appears that the simple solution is just to move the UpdateDocumentCache command for the blog post above UmbracoAPIHelper.CreateContentNode and rebuild the dll.

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

    That sounds insteresting.

    Good find.

    I would also log the issue with examine. 

    Cheers.

     

  • Allan Hawkey 232 posts 303 karma points
    Sep 12, 2011 @ 19:50
    Allan Hawkey
    0

    Has this been fixed in v2.0 of uBlogsy?  Reason I ask is that I'm getting a different, but seemingly similar error in uBlogsy 2.0 and also nForum - in both cases, I get an issue when moving media items in the media section.

    See http://our.umbraco.org/projects/website-utilities/nforum/bugs/23610-Error-in-media-section for the error I get when I do this with nForum installed.  When I uninstall nForum, then the nForum error goes away and the new error refers to uBlogsy.  And when I uninstall uBlogsy, the error goes away completely.

    Thanks
    Allan

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

    Yes I did implement this in 2.0

    Strange error.

    What packages are installed?

     

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

    Hi Anthony

    In case this was down to a conflict with another package (I have quite a few installed), I installed a fresh instance of Umbraco 4.7 and then installed uBlogsy 2.0 beta and NO other packages at all.  I thought this would be easier than eliminating all the other packages one by one.

    I added 2 folders to the media section (Photos and Images) and uploaded a picture (right click Photos, Create, Image).  I then moved the image to the Images folder (right click on the photo in the tree, Move, select Images folder) and got the error below:

    Server Error in '/' Application.


    No Document exists with Version '7faa9414-be6e-4192-89d5-46032605f388'

    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.ArgumentException: No Document exists with Version '7faa9414-be6e-4192-89d5-46032605f388'

    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:

    [ArgumentException: No Document exists with Version '7faa9414-be6e-4192-89d5-46032605f388']
       umbraco.cms.businesslogic.web.Document.setupNode() +487
       umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) +36
       umbraco.cms.businesslogic.web.Document..ctor(Int32 id) +14
       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:125
       System.EventHandler`1.Invoke(Object sender, TEventArgs e) +0
       umbraco.cms.businesslogic.CMSNode.FireAfterMove(MoveEventArgs e) +27
       umbraco.cms.businesslogic.CMSNode.Move(CMSNode parent) +1163
       umbraco.dialogs.moveOrCopy.HandleDocumentMoveOrCopy() +1505
       umbraco.dialogs.moveOrCopy.HandleMoveOrCopy(Object sender, EventArgs e) +74
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       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) +5563
    

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    After reloading nodes in the media section, the photo had been moved to the correct destination.

    I then uninstalled uBlogsy (deleting all the child document types first - which is a pain!!).  Then went back to media and repeated the move process, and the photo moved successfully with no error message.

    So it's definitely something to do with the uBlogsy installation - and to me, it seems most likely to relate to:

        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:125 

    I wonder if the same logic as Suzy and Doug were discussing earlier in this post re the Document_AfterPublish event handler also applies to Document_AfterMove?

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

    Ah!

    Nice find!

    Your crash is due to this:

    void Document_AfterMove(object sender, MoveEventArgs e) { Document doc = new Document(((CMSNode)sender).Id); if (doc.ContentType.Alias == "uBlogsyPost") {

     

    I'll fix it in the next release.

    Thanks.

     

     

     

  • Sean Dooley 288 posts 527 karma points
    Nov 24, 2011 @ 13:14
    Sean Dooley
    0

    Experiencing this issue after copying uBlogsy - Landing content node and child content nodes to new area of site. Can still publish original uBlogsy nodes without any issues.

    Using uBlogsy 1.36

    Is there a fix without creating a site package?

  • Nadia 45 posts 122 karma points
    Dec 13, 2011 @ 22:47
    Nadia
    0

    Hi,

    I'm getting the same error. Using Umbraco 4.7.1 and uBlogsy 2.0 (beta2).

    Value cannot be null.
    Parameter name: attribute

    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.ArgumentNullException: Value cannot be null.
    Parameter name: attribute

    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: 

    [ArgumentNullException: Value cannot be null.
    Parameter name: attribute]
       System.Xml.Linq.XAttribute.op_Explicit(XAttribute attribute) +91251
       UmbracoExamine.UmbracoContentIndexer.ReIndexNode(XElement node, String type) +107
       Examine.ExamineManager._ReIndexNode(XElement node, String type, IEnumerable`1 providers) +81
       UmbracoExamine.UmbracoEventManager.content_AfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +174
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.FireAfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +26
       umbraco.content.UpdateDocumentCache(Document d) +749
       umbraco.content.UpdateDocumentCache(Int32 pageId) +52
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +106
       uBlogsy.BusinessLogic.DateFolderService.EnsureCorrectParentForPost(Document doc) +280
       uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterSave(Document sender, SaveEventArgs e) +163
       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() +179
       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) +98
       uBlogsy.BusinessLogic.PostService.CreatePost(Int32 documentId) +96
       uBlogsy.Web.usercontrols.uBlogsy.dashboard.CreatePost.btnSubmit_Click(Object sender, EventArgs e) +82
       

    I have another examine index. Which if I remove it, stops this error. But I need any solutions available?

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

    Hi Suzy

    The same bug was in 2.0 beta 2. Fixed and will be released soon.

     

  • Nadia 45 posts 122 karma points
    Dec 13, 2011 @ 23:06
    Nadia
    0

    Oh that was the stack trace when I create a post... this is the stack trace when I try and publish a post

    [ArgumentNullException: Value cannot be null.
    Parameter name: attribute]
       System.Xml.Linq.XAttribute.op_Explicit(XAttribute attribute) +91251
       UmbracoExamine.UmbracoContentIndexer.ReIndexNode(XElement node, String type) +107
       Examine.ExamineManager._ReIndexNode(XElement node, String type, IEnumerable`1 providers) +81
       UmbracoExamine.UmbracoEventManager.content_AfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +172
       umbraco.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) +0
       umbraco.content.FireAfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) +26
       umbraco.content.UpdateDocumentCache(Document d) +749
       umbraco.content.UpdateDocumentCache(Int32 pageId) +52
       umbraco.library.UpdateDocumentCache(Int32 DocumentId) +106
       uHelpsy.Core.UmbracoAPIHelper.UpdateContentNode(Document doc, Dictionary`2 properties, Boolean publish) +134
       uHelpsy.Core.UmbracoAPIHelper.CreateContentNode(String nodeName, String nodeTypeAlias, Dictionary`2 properties, Int32 parentId, Boolean publish) +124
       uBlogsy.BusinessLogic.DocumentService.EnsureCommentsFolder(Document doc) +298
       uBlogsy.BusinessLogic.EventHandlers.UmbracoExtensions.Document_AfterPublish(Document sender, PublishEventArgs e) +118
     
  • Nadia 45 posts 122 karma points
    Dec 13, 2011 @ 23:11
    Nadia
    0

    Oh cheers thanks.. I don't suppose I could get a pre-release of the fix  

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Dec 14, 2011 @ 00:37
    Anthony Dang
    0

    Sure

    What's your email?

     

  • Nadia 45 posts 122 karma points
    Dec 14, 2011 @ 00:44
    Nadia
    0

    [email protected] thanks :)

  • Doug Clark 30 posts 52 karma points
    Jan 13, 2012 @ 20:09
    Doug Clark
    0

    Hi all, I'm not sure if the problems we're experiencing is related to all this or not. We've set up a special blog editors role that only has privledges to "send to publish." When those users try to send a blog to publish, they get this .NET error:

    [NullReferenceException: Object reference not set to an instance of an object.]
       uTagsy.Web.usercontrols.uTagsy.datatypes.uTagsy.SaveSettings() in D:\_PROJECTS\uBlogsy\Branches\1.32_bugs_search\uBlogsy\uBlogsy\usercontrols\uTagsy\uTagsy.ascx.cs:103
       uTagsy.Web.usercontrols.uTagsy.datatypes.uTagsy.OnLoad(EventArgs e) in D:\_PROJECTS\uBlogsy\Branches\1.32_bugs_search\uBlogsy\uBlogsy\usercontrols\uTagsy\uTagsy.ascx.cs:39
       System.Web.UI.Control.LoadRecursive() +74
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Control.LoadRecursive() +146
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

    The administrative role can publish blog posts with no error.

    Any ideas?

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Jan 14, 2012 @ 01:24
    Anthony Dang
    0

    Have you tried it with another role?

    A work around is to replace the datatype with the standard Umbraco tags datatype. You may loose tags for existing posts though.

     

     

  • Jason 22 posts 41 karma points
    Mar 08, 2012 @ 06:11
    Jason
    0

    Still having issues with ublogsy publishing when having the CWS (creative website starter package) installed.  Trying to see if ublogsy is stable enough to be incorporated into an existing website and am testing by adding it to the CWS package.  

    Umbraco 4.7.1.1, uBlogsy 2.0.0.1

    I've read the solution posted by suzyb, but have looked at the source code for 2.0.0.1 and the change was made to the uBlogsy.BusinessLogic EnsureCommentsFolder method and is not working.

    Any information would be appreciated.  Thanks in advanced.

    ********UPDATE 2011-03-11 ******************

    Was able to remove the CWS examine index and rebuild it.  publishing worked.

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Mar 22, 2012 @ 01:18
    Anthony Dang
    0

    Ah I wasnt aware that cws had a custom examine index.

    So that was the solution?

    I think someone told me that if you upgrade to the newest examine it would have fixed it.

     

Please Sign in or register to post replies

Write your reply to:

Draft