Copied to clipboard

Flag this post as spam?

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


  • webangelo 107 posts 190 karma points
    Aug 28, 2009 @ 00:02
    webangelo
    0

    Error trying to import BlogPostComments for blogforUmbraco4

    I received the following error while trying to import BlogPostComments via XML using the UmbImport.  The error occurred after I mapped the XML fields to the Document Fields.  On previous uses with other Document Types I received a confirmation screen, but in this case an error was thrown.  I don't want to post my data, but I can send you a sample if you are unable to re-create the issue.

    Umbraco Version: 4.0.2.1
    ASP.Net 3.5
    Windows Server 2008, IIS 7

    StackTrace:

    [ArgumentException: An item with the same key has already been added.]
       System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +51
       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +7462172
       UmbImport.ImportSteps.MapProperties.UpdateState(ImportState state) +192
       UmbImport.UmbImport.UpdateState() +56
       UmbImport.UmbImport.NextButton_Click(Object sender, EventArgs e) +13
       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
  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 28, 2009 @ 09:37
    Richard Soeteman
    0

    Hi again,

    I'm intersested in two things:

    1. The column of your datasource that you want to map?
    2. The documenttype properties  Name and Alias that you want to map?

    Cheers,

    Richard

  • webangelo 107 posts 190 karma points
    Sep 03, 2009 @ 17:27
    webangelo
    0

    I'll do that if my next effort doesn't work.  I see that in the BlogPostComment there are two fields called "Name".  The Name of the Document and the Name of the Author.  Let me try to rename one of those fields and see if that works.

     

     

  • webangelo 107 posts 190 karma points
    Sep 03, 2009 @ 18:41
    webangelo
    0

    The issue appears to be both the Name and the Email fields for that Document Type.  I assume the alias' used are also used for some hidden fields.  If I change the alias as follows the import seems to work:  name -> commentAuthor; email -> commentEmail.  Now I just have to make sure that those changes don't affect any of the functionality of the Blog (i.e. I'll probably need to update the templates and XSLT files in the least).

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Dec 02, 2009 @ 22:51
    Paul Sterling
    0

    Richard -

    Indeed, if there is a duplicate named property the error 'An item with the same key has already been added' will be generated.  In my case there was a user defined property 'name' in addition to the Umbraco default 'name' property - once the user defined property was renamed, all was good.

    I know its a lot to ask, but for a future version it would be great to trap this error and warn the user...among many others I'm sure.

    -Paul

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 03, 2009 @ 08:58
    Richard Soeteman
    0

    Hi Paul and others,

    This issue is fixed in the 1.0.3 release. I'm currently testing this and hope to release it (very) soon.

    Cheers,

    Richard

     

  • Paul Sterling 718 posts 1534 karma points MVP 8x admin c-trib
    Dec 04, 2009 @ 23:01
    Paul Sterling
    0

    Richard -

    The beta of 1.0.3 that you provided does, indeed, fix this issue.

    Thanks!

    -Paul

  • Yannick Smits 321 posts 718 karma points
    Dec 24, 2009 @ 20:35
    Yannick Smits
    0

    Too bad 1.03 is not yet available. But the tip to rename the fields helped me out for now. thanks Paul

Please Sign in or register to post replies

Write your reply to:

Draft