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.
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.
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 -
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
Thanks for reporting this Steve! Taking a look at it now.
Cheers,
Tim
Comment author was deleted
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
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:
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
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 :
Not sure if it'll help but thought it worth mentioning.
Cheers,
Tony
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:
... 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.
is working on a reply...