I'm getting this error: This happened after i got a "handle is invalid" exception while adding form fields through the editor.
Umbraco 6.1.2 and contour 3.014
Sequence contains more than one matching element
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.InvalidOperationException: Sequence contains more than one matching element
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:
[InvalidOperationException: Sequence contains more than one matching element]
System.Linq.Enumerable.Single(IEnumerable`1 source, Func`2 predicate) +4134592
Umbraco.Forms.CodeFirst.FormManager.SynchronizeForm(Type typeForm) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:341
Umbraco.Forms.CodeFirst.FormManager.SynchronizeForms() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:201
Umbraco.Forms.CodeFirst.FormManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\FormBuilder\FormManager.cs:24
Umbraco.Forms.CodeFirst.UmbracoManager.Synchronize() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:36
Umbraco.Forms.CodeFirst.UmbracoManager.SynchronizeIfNotSynchronized() in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\UmbracoManager.cs:21
Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule.context_BeginRequest(Object sender, EventArgs e) in c:\Program Files (x86)\teamcity\buildAgent\work\fdc2f0fcbbcef310\Umbraco.Forms.CodeFirst\ContourFormBuilderHttpModule.cs:27
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
I'm getting this error all the time. I keep going into the db to fix it, but I'd like a more sustainable solution. Anyone know if there is an upgrade to this error or if I can prevent it some how?
First I deleted my added property in the database table: cmsPropertyType (didn't solved the problem) Then I deleted a duplicate tab in cmsPropertyTypeGroup (it's the last row in the table).
I am getting the same error and can't seem to find where the issue is
Below is my stack trace if I do a refresh of the webpage it works fine
2016-01-15 09:48:53,472 [13] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 9] An unhandled exception occurred
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at Umbraco.Forms.CodeFirst.FormManager.SynchronizeForm(Type typeForm)
at Umbraco.Forms.CodeFirst.FormManager.SynchronizeForms()
at Umbraco.Forms.CodeFirst.FormManager.Synchronize()
at Umbraco.Forms.CodeFirst.UmbracoManager.Synchronize()
at Umbraco.Forms.CodeFirst.UmbracoManager.SynchronizeIfNotSynchronized()
at Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule.context_BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I am having this issue with the new Umbraco Forms.. There is 2 errors happening.. First is GetByUserId?userId= - the error suggests that multiple user objects are being returned. awesome.
The second seems to be bailing out since the form object is not populated. Any thoughts on troubleshooting?
There is definitely a bug in Umbraco Forms.. A user should never have more than one UserFormSecurity entry for a form. From this screen shot you can see user id 0 has 2 permission entries for the 1c7e* form.
User ID 4 has 2 entires for the 5e934a* form.
Manually deleting them such that there is only one entry per user per form eliminates the issue.
Reproduce: Add a form via the default templates (I was using Contact Form). Save. Crashes going forward..
Sequence contains more than one matching element
I'm getting this error: This happened after i got a "handle is invalid" exception while adding form fields through the editor.
Umbraco 6.1.2 and contour 3.014
Sequence contains more than one matching element
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.InvalidOperationException: Sequence contains more than one matching element
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:
I just had the same error again. It seems that there is a duplicate somewhere? What can I do to fix this?
Comment author was deleted
Hey Hicham, when do you get the error, after deploying a code first form (or code first form updates)? Or... ?
I am having this problem too.
I thikn it came from when I added a content tab (named Content_) to the parent DocumentType, then moved my content DataTypes to the new content tab.
Then deleted the tab in the child DocType and renamed the parent one to Content.
Comment author was deleted
@Rich that doesn't sound like a Contour issue, do you have the same stack trace? So with mentions of Umbraco.Forms
I'm getting this error all the time.
I keep going into the db to fix it, but I'd like a more sustainable solution.
Anyone know if there is an upgrade to this error or if I can prevent it some how?
Comment author was deleted
Hey Johan,
DO you have a full stack trace of the error, and how are you fixing it in the db, if you provide some more details I can provide a fix :)
Hi,
I'm having the same issue after adding a new field to a document type.
Could you share how you fixed it in the database please?
Thanks!
Turns out the issue was with the same tab name on an inherited content type.
To fix it, I deleted the tab from the parent, then from the child, and re-added it to the parent.
Seems to have done the trick.
I've had the same issue in Umbraco v6.1.6.
First I deleted my added property in the database table: cmsPropertyType (didn't solved the problem)
Then I deleted a duplicate tab in cmsPropertyTypeGroup (it's the last row in the table).
Working like a charm again.
I am getting the same error and can't seem to find where the issue is
Below is my stack trace if I do a refresh of the webpage it works fine
2016-01-15 09:48:53,472 [13] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 9] An unhandled exception occurred System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.Enumerable.Single[TSource](IEnumerable
1 source, Func
2 predicate) at Umbraco.Forms.CodeFirst.FormManager.SynchronizeForm(Type typeForm) at Umbraco.Forms.CodeFirst.FormManager.SynchronizeForms() at Umbraco.Forms.CodeFirst.FormManager.Synchronize() at Umbraco.Forms.CodeFirst.UmbracoManager.Synchronize() at Umbraco.Forms.CodeFirst.UmbracoManager.SynchronizeIfNotSynchronized() at Umbraco.Forms.CodeFirst.ContourFormBuilderHttpModule.context_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)Anyone figure this out?
I am having this issue with the new Umbraco Forms.. There is 2 errors happening.. First is GetByUserId?userId= - the error suggests that multiple user objects are being returned. awesome.
The second seems to be bailing out since the form object is not populated. Any thoughts on troubleshooting?
Ok, I guess I spoke too soon.
There is definitely a bug in Umbraco Forms.. A user should never have more than one UserFormSecurity entry for a form. From this screen shot you can see user id 0 has 2 permission entries for the 1c7e* form.
User ID 4 has 2 entires for the 5e934a* form.
Manually deleting them such that there is only one entry per user per form eliminates the issue.
Reproduce: Add a form via the default templates (I was using Contact Form). Save. Crashes going forward..
is working on a reply...