Copied to clipboard

Flag this post as spam?

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


  • Claus Nedergaard 62 posts 104 karma points
    Feb 26, 2013 @ 17:10
    Claus Nedergaard
    0

    Edit member throws error - "an item with the same key has already been added"

    On a umb 4.7.2 and Contour 1.1.13

    I made a register form - works nicely

    Made an edit member form :-(. Throws this at me:

    Server Error in '/' Application.

    An item with the same key has already been added.

    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: An item with the same key has already been added.

    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: An item with the same key has already been added.]
       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +12679472
       Umbraco.Forms.Data.StringHelper.(String , Object ) +938
       Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext Context, Record record, String value) +288
       Umbraco.Forms.Core.Providers.FieldTypes.Textfield.get_Editor() in c:\Program Files (x86)\teamcity\buildAgent\work\b3edc26891766501\Umbraco.Forms.Core.Providers\FieldTypes\Textbox.cs:43
       Umbraco.Forms.UI.Usercontrols.RenderForm.RenderField(Object sender, RepeaterItemEventArgs e) +3213
       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +204
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +627
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +167
       Umbraco.Forms.UI.Usercontrols.RenderForm.RenderFieldset(Object sender, RepeaterItemEventArgs e) +1053
       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +204
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +627
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +167
       Umbraco.Forms.UI.Usercontrols.RenderForm.RenderUi() +3755
       Umbraco.Forms.UI.Usercontrols.RenderForm.OnInit(EventArgs e) +1069
       System.Web.UI.Control.InitRecursive(Control namingContainer) +133
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +277
       Umbraco.Forms.UI.Dialogs.previewFormDialog.OnInit(EventArgs e) +1568
       System.Web.UI.Control.InitRecursive(Control namingContainer) +133
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1970

     

    I followed some threads on here and from the hints I got I deleted all records i the Db, deleted all forms and started over. No luck.

    Anyone out there with some knowledge on this issue?

  • Claus Nedergaard 62 posts 104 karma points
    Feb 26, 2013 @ 17:12
    Claus Nedergaard
    0

    Uhh... Should mention that the edit form works fine when the 'DefaultValue' is left empty OR has a standard text (fx. 'write your name').

    The mess begins when I use the brackets to fetch the member like this {member.email} ...that causes the error.

  • Comment author was deleted

    Feb 27, 2013 @ 10:51

    ANd does this happne for a specific member. value or all of them?

  • Claus Nedergaard 62 posts 104 karma points
    Feb 28, 2013 @ 09:08
    Claus Nedergaard
    0

    Hi Tim,

    Just tested it. It happens to all members. And it happens to all values both custom and native.

  • Comment author was deleted

    Feb 28, 2013 @ 10:25

    Ok might have been a bug in that version (since you are using an older one) I would recommend upgrading (both umbraco and contour)

  • Claus Nedergaard 62 posts 104 karma points
    Mar 04, 2013 @ 12:40
    Claus Nedergaard
    0

    Hi Tim,

    I updated umbraco to 4.9 (higher version blew out my teacommerce) and contour to 3.0. The error is the same. I guess theres no real fix for this.

    Claus

  • Comment author was deleted

    Mar 04, 2013 @ 12:58

    Hmmm well I can't reproduce the error, mind sending me your install, then I might be able to debug

    To tg at umbraco dot com

    Thanks,
    Tim 

  • Sören Deger 733 posts 2844 karma points c-trib
    Dec 13, 2013 @ 12:26
    Sören Deger
    0

    Hi Tim,

    I have the same issue!

    Umbraco 6.1.6
    Contour 3.0.17

     

    Best regards

    Sören 

  • Sören Deger 733 posts 2844 karma points c-trib
    Dec 13, 2013 @ 12:29
    Sören Deger
    2

    I have solved it!

    I had a custom property with alias eMail. After rename it, it works! There are trouble with the standard alias email

  • Liam 22 posts 158 karma points
    Mar 10, 2014 @ 21:55
    Liam
    0

    Thanks Sören..

  • Jonas Eriksson 930 posts 1825 karma points
    Jan 29, 2015 @ 16:43
    Jonas Eriksson
    0

    I have this problem aswell, renaming my custom property from "email" did not work. Also - I tried to create a new member with a completely default member type, but it did not help.

    Steps to reproduce (in my case with Forms 4.01): Add a form with one field and defaultvalue {something}. Display the form.

    Stack trace:

    [ArgumentException: An item with the same key has already been added.]
       System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +10752734
       System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +10
       Umbraco.Forms.Data.Ž.’() +613
       umbraco.cms.businesslogic.cache.<>c__DisplayClass1`1.<GetCacheItem>b__0() +10
       Umbraco.Core.<>c__DisplayClass2`1.<GetCacheItem>b__0() +10
       System.Lazy`1.CreateValue() +180
       System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +22
       System.Lazy`1.get_Value() +11083481
       Umbraco.Core.Cache.HttpRuntimeCacheProvider.GetCacheItem(String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, CacheItemPriority priority, CacheItemRemovedCallback removedCallback, CacheDependency dependency) +937
       Umbraco.Core.CacheHelper.GetCacheItem(String cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, Func`1 getCacheItem) +375
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +199
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +79
       umbraco.cms.businesslogic.cache.Cache.GetCacheItem(String cacheKey, Object syncLock, CacheItemRemovedCallback refreshAction, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +76
       Umbraco.Forms.Core.Services.CacheService.GetCacheItem(String cacheKey, Object syncLock, TimeSpan timeout, GetCacheItemDelegate`1 getCacheItem) +114
       Umbraco.Forms.Data.StringHelper.(String , Object ) +1462
       Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext Context, Record record, String value) +519
       Umbraco.Forms.Data.StringHelper.ParsePlaceHolders(HttpContext Context, String value) +50
       Umbraco.Forms.Core.Extensions.StringExtensions.ParsePlaceHolders(String text) +56
       Umbraco.Forms.Mvc.Models.FormViewModel.FetchDefaultValue(Field field) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Models\FormViewModel.cs:249
       Umbraco.Forms.Mvc.Models.FormViewModel.Build(Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Models\FormViewModel.cs:122
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.Render(Guid formId, Int32 recordId, String view, String mode) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:31
       lambda_method(Closure , ControllerBase , Object[] ) +288
       System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +181
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
       System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
       System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
       System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +225
       System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.Mvc.<>c__DisplayClassa.<EndProcessRequest>b__9() +22
       System.Web.Mvc.<>c__DisplayClass4.<Wrap>b__3() +10
       System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Func`1 func) +27
       System.Web.Mvc.ServerExecuteHttpHandlerWrapper.Wrap(Action action) +64
       System.Web.Mvc.ServerExecuteHttpHandlerAsyncWrapper.EndProcessRequest(IAsyncResult result) +71
       System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +1464
    
    [HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.]
       System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +3174527
       System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage) +76
       System.Web.HttpServerUtility.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +28
       System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler handler, TextWriter writer, Boolean preserveForm) +19
       System.Web.Mvc.Html.ChildActionExtensions.ActionHelper(HtmlHelper htmlHelper, String actionName, String controllerName, RouteValueDictionary routeValues, TextWriter textWriter) +463
       System.Web.Mvc.Html.ChildActionExtensions.RenderAction(HtmlHelper htmlHelper, String actionName, String controllerName, Object routeValues) +56
       ASP._Page_Views_Event_cshtml.Execute() in d:\home\site\wwwroot\Views\Event.cshtml:125
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +199
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +236
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245
       System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245
       System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +176
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +75
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651188
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
  • Jonas Eriksson 930 posts 1825 karma points
    Jan 29, 2015 @ 17:08
    Jonas Eriksson
    0

    My workaround is setting the data I need to session and using [%sessionkey] 

Please Sign in or register to post replies

Write your reply to:

Draft