Copied to clipboard

Flag this post as spam?

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


  • steve 1 post 21 karma points
    Aug 11, 2010 @ 22:41
    steve
    0

    Possible Contour bug - duplicate field names with email workflow

    I think I may have found a bug in the Contour product...I am currently using version 1.0, but I downloaded 1.1 (released yesterday) and verified that the problem still occurs.

    I created a simple form with two fields - name, and name. (Yes, identical field names.) When I submitted that form, everything worked great.

    Then, I added a workflow to the Submit event, to send an email to myself. I left the default text in the body of the email. Now, when I submit the form, I get this exception - 

     

    [ArgumentException: An item with the same key has already been added.]
       System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +12673712
       Umbraco.Forms.Data.StringHelper.parseRecordPlaceholders(String value, Record record) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\StringHelper.cs:109
       Umbraco.Forms.Core.Services.WorkflowService.ExecuteWorkflows(List`1 workflows, RecordEventArgs e) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Services\WorkflowService\WorkflowService.cs:86
       Umbraco.Forms.Core.Services.RecordService.Approve() in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Services\RecordService\RecordService.cs:175
       Umbraco.Forms.Core.Services.RecordService.NextPage() in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Services\RecordService\RecordService.cs:226
       Umbraco.Forms.UI.Usercontrols.RenderForm.nextPage(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:189
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691

     

    Anyone experienced this same problem, and/or have a workaround? Besides the obvious "name all fields uniquely", or "don't have an email workflow". The reason I want duplicate field names, is to create a multi-step form, for example to enter your information, then your spouse's...and be able to leave the captions as "Name", "Email",... on each step, rather than having to prepend "Your" and "Your spouse's" to each field caption. 

    Thanks much...

  • Comment author was deleted

    Aug 12, 2010 @ 09:34

    Thanks for reporting this Steve! Taking a look at it now.

    Cheers,
    Tim

  • Comment author was deleted

    Aug 12, 2010 @ 11:16

    Contour 1.1.1 is out (including a fix for this issue)

    Package and update available on project page: http://our.umbraco.org/projects/umbraco-pro/contour

  • Mysterious 27 posts 47 karma points
    Feb 22, 2012 @ 15:54
    Mysterious
    0

    Hello I am using:

    Contour 1.1.7 and I am having the same problem, It was working in past, then I started to get this exception when I open the workflow of my form:

    [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) +9374523
       Umbraco.Forms.Data.Storage.SettingsStorage.GetSettings(Guid id) +187
       Umbraco.Forms.Data.Storage.WorkflowStorage.GetAllWorkFlows(Form form) +213
       Umbraco.Forms.UI.Pages.editFormWorkflows.OnInit(EventArgs e) +495
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480

  • Mysterious 27 posts 47 karma points
    Feb 29, 2012 @ 13:46
    Mysterious
    0

    Hello anyone!!!!

    I am still having the same error when I submit the form I updated to the latest version of contour and still the same error

    An item with the same key has already been added

    anyhelp is appreciated

  • Tony Bolton 83 posts 109 karma points
    Mar 02, 2012 @ 01:25
    Tony Bolton
    0

    Hi Mysterious,

    Bit of a long shot this - but I had the same issue except when trying to delete items.  In the end I cleared out the backend entries and that did the trick.

    Here's the SQL I ran - bear in mind this'll clear out all forms that have been filled in and stored so use with utmost care :

    DELETE FROM UFRECORDDATABIT
    DELETE FROM UFRecordDataDateTime
    DELETE FROM UFRecordDataInteger
    DELETE FROM UFRecordDataLongString
    DELETE FROM UFRecordDataString
    DELETE FROM UFRecordFields
    DELETE FROM UFRecords
    DELETE FROM UFRecordsXml

    Not sure if it'll help but thought it worth mentioning.

    Cheers,

    Tony

  • Fergus Davidson 309 posts 588 karma points
    May 12, 2012 @ 22:15
    Fergus Davidson
    0

    i have had the same issue one form with 16 sets of email/name/company fields with same names. data of first set is saved, all others are lost.

    my solution was to put unique identifiers in the label for the field in square brackets as below:

    name [person one]

    name [spouse]

    ..then to hide the bracketed text using the following jquery:

    <script>
      $(document).ready(function() {
       
      $('label').html( function (foo,oldhtml) {
      var content = oldhtml.replace(/\[.*\]/gi,"");
      return content;
      });
      });
      </script>

    ... which looks for label tags containing the square brackets and hides it.

    has an added advantage of making the column headings in the data export meaningful too.

Please Sign in or register to post replies

Write your reply to:

Draft