Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

Sequence contains more than one matching element when site sync dynamic item

« Go Back

Information

 
Article Number000108844
EnvironmentProduct: Sitefinity
Version: 11.x, 12.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description
Site is broken after site sync.
Error Sequence contains more than one matching element appears in Sitefinity logs after syncing data with site sync.
The site can`t start up after data was synced with site sync.
Steps to Reproduce
Clarifying Information
Error MessageMessage : Sequence contains more than one matching element
Source : Unity_ILEmit_DynamicClasses
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Object GetTransaction()
HResult : -2146233079
Stack Trace : at DynamicModule.ns.Wrapped_OpenAccessModuleBuilderDataProvider_afc4367e6b3f4206808266e4a9dec056.GetTransaction()
at Telerik.Sitefinity.DynamicModules.Builder.DynamicModulesCache..ctor(ModuleBuilderManager manager)
at Telerik.Sitefinity.DynamicModules.Builder.ModuleBuilderManager.GetModules()
at Telerik.Sitefinity.Abstractions.DescriptorExtensons.GetFieldType(PropertyDescriptor descriptor)
at Telerik.Sitefinity.Web.Api.OData.Model.DefaultEdmTypeBuilder.GetPropertyStrategy(PropertyDescriptor desc, Type itemType, Boolean fallback)
at Telerik.Sitefinity.Web.Api.OData.Model.DefaultEdmTypeBuilder.GetPropertyStrategy(String name, Type itemType, Boolean fallback)
at Telerik.Sitefinity.Web.Api.OData.Model.DefaultEdmTypeBuilder.TryMapField(String name, IPersistentPropertyMapping entry)
at Telerik.Sitefinity.Web.Api.OData.Model.DefaultEdmTypeBuilder.MapPersistentProperties()
at Telerik.Sitefinity.Web.Api.OData.Model.DefaultEdmTypeBuilder.Build()
at Telerik.Sitefinity.Web.Api.OData.Model.ConfiguredEdmModel.BuildConfiguredType(String typeFullName, String setName)
at Telerik.Sitefinity.Web.Api.OData.Model.ConfiguredEdmModel.Init(IEnumerable`1 types)
at Telerik.Sitefinity.Web.Api.OData.Model.EdmModelWrapper.GenerateModel()
at Telerik.Sitefinity.Utilities.ConcurrentProperty`1.get_Value()
at Telerik.Sitefinity.Web.Api.OData.Model.EdmModelWrapper.get_EntityContainer()
at Microsoft.OData.Edm.ExtensionMethods.FindDeclaredEntitySet(IEdmModel model, String qualifiedName)
at Microsoft.OData.Edm.ExtensionMethods.FindDeclaredNavigationSource(IEdmModel model, String qualifiedName)
at Microsoft.OData.UriParser.ODataUriResolver.ResolveNavigationSource(IEdmModel model, String identifier)
at Microsoft.OData.UriParser.ODataPathParser.TryCreateSegmentForNavigationSource(String identifier, String parenthesisExpression)
at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText)
at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection`1 segments)
at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection`1 segments, ODataUriParserConfiguration configuration)
at Microsoft.OData.UriParser.ODataUriParser.ParsePathImplementation()
at Microsoft.OData.UriParser.ODataUriParser.Initialize()
at Microsoft.AspNet.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)
at Microsoft.AspNet.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)
at Microsoft.AspNet.OData.Routing.ODataPathRouteConstraint.GetODataPath(String oDataPathString, String uriPathString, String queryString, Func`1 requestContainerFactory)
at Microsoft.AspNet.OData.Routing.ODataPathRouteConstraint.Match(HttpRequestMessage request, IHttpRoute route, String parameterName, IDictionary`2 values, HttpRouteDirection routeDirection)
at Telerik.Sitefinity.Web.Api.OData.Routing.DynamicODataConstraint.Match(HttpRequestMessage request, IHttpRoute route, String parameterName, IDictionary`2 values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.ProcessConstraint(HttpRequestMessage request, Object constraint, String parameterName, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.ProcessConstraints(HttpRequestMessage request, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)
at System.Web.Http.Routing.HttpRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)
at Telerik.Sitefinity.Web.Api.OData.Routing.CompositeRoute.GetRouteDataInternal(String virtualPathRoot, HttpRequestMessage request)
Defect/Enhancement Number
Cause
There was a difference in the database data in the destination site (the site which receives site sync data) and the source site (the site that sends site sync data). The difference was in the entries in table [sf_meta_fields] table.
A user has manually updated a module built with module builder and added new fields in it. In site sync setup this is unsupported, all field updates have to be done at the source site and site synced to the destination site.
Resolution
1. Compare the entries in table  [sf_meta_fields] from the source site and destination sites and delete entries from the destination site`s  [sf_meta_fields] which are not present in the source site`s table.
2. Restart the destination site after the data is deleted.

Sample delete queries
delete from [sf_meta_fields]
where id = '6FF6C147-E687-401F-927D-6508C52B0E2B'
delete from [sf_meta_fields]
where id = 'C80B9040-3E57-4270-B5A9-860A05949BED'
Workaround
Notes
Attachment 
Last Modified Date5/22/2020 7:38 AM