Copied to clipboard

Flag this post as spam?

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


  • Hicham Khabbazy 10 posts 32 karma points
    Jul 24, 2013 @ 12:59
    Hicham Khabbazy
    0

    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:

    [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
    

     

     

  • Hicham Khabbazy 10 posts 32 karma points
    Jul 25, 2013 @ 10:19
    Hicham Khabbazy
    0

    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

    Jul 30, 2013 @ 09:38

    Hey Hicham, when do you get the error, after deploying a code first form (or code first form updates)? Or... ?

  • rich hamilton 117 posts 136 karma points
    Aug 02, 2013 @ 11:23
    rich hamilton
    0

    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

    Aug 02, 2013 @ 11:24

    @Rich that doesn't sound like a Contour issue, do you have the same stack trace? So with mentions of Umbraco.Forms

  • Johan Ketels 13 posts 43 karma points
    Aug 08, 2013 @ 14:01
    Johan Ketels
    0

    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

    Aug 08, 2013 @ 14:03

    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 :)

  • Dan 5 posts 27 karma points
    Mar 13, 2014 @ 03:10
    Dan
    0

    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!

  • Dan 5 posts 27 karma points
    Mar 13, 2014 @ 03:30
    Dan
    2

    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.

  • Stefan van Leusden 21 posts 73 karma points
    Mar 12, 2015 @ 16:05
    Stefan van Leusden
    0

    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.
     

     

     

  • Balram Narad 37 posts 89 karma points
    Jan 15, 2016 @ 10:09
    Balram Narad
    0

    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)

  • M N 125 posts 212 karma points
    Aug 16, 2016 @ 16:25
    M N
    0

    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?

    enter image description here enter image description here

  • M N 125 posts 212 karma points
    Aug 16, 2016 @ 16:38
    M N
    0

    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..

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft