November Happy Hour will be moved to Thursday December 5th.

Export pages and files fail with "Sequence" error?

Vote:
 

Hi, 

We get this problem when try export pages with files -> https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2014/8/Sequence-contains-more-than-one-matching-element-exception-when-exporting-CMS-pages/

The following errors have occurred:


[Exporting content 52115] Exception: Sequence contains more than one matching element[]
[Exporting content 52115] Can't export package because: Sequence contains more than one matching element

If i understand right, problem for this is "For this page" is wrong type, I see that is "Content Folder" right now and it should be "Content Assets folder"?

How can i change that ? (CMS 11.14.1.0)

#218609
Edited, Mar 17, 2020 5:57
Vote:
 

Is there anything in log corresponding with the issue? 

#218634
Mar 17, 2020 14:18
Vote:
 

ERROR EPiServer.Core.Transfer.TransferLogger: 10.5.3 Export/import error: [Exporting content 52649] Can't export package because: Sequence contains more than one matching element
System.InvalidOperationException: Sequence contains more than one matching element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at EPiServer.Core.Transfer.Internal.DefaultImplicitContentExporter.ExportDependentContent(IContent content, IContentTransferContext transferContext)
at EPiServer.Core.Transfer.Internal.BlobTransfer.TryAddFile(String filePath, String& addedFilePath)
at EPiServer.Core.Transfer.Internal.MultiplexingFileTransfer.TryAddFile(String filePath, String& addedFilePath)
at EPiServer.Core.Transfer.Internal.PropertyXhtmlTransform.ExportLinksAndAddFiles(String url, IContentTransferContext transferContext)
at EPiServer.Core.Transfer.Internal.PropertyXhtmlTransform.ExportFragments(StringFragmentCollection fragments, IContentTransferContext transferContext)
at EPiServer.Core.Transfer.Internal.PropertyXhtmlTransform.TransformForExport(PropertyXhtmlString source, RawProperty output, PropertyExportContext context)
at EPiServer.Core.Transfer.Internal.DefaultPropertyExporter.RunTransforms(PropertyData property, RawProperty raw, PropertyExportContext context)
at EPiServer.Core.Transfer.Internal.DefaultPropertyExporter.ExportProperty(PropertyData source, RawProperty output, PropertyExportContext context)
at EPiServer.Core.Transfer.Internal.DefaultPropertyExporter.ExportProperties(IContentData source, IEnumerable`1 properties, PropertyExportContext context)
at EPiServer.Core.Transfer.Internal.DefaultPropertyExporter.ExportProperties(IContentData source, IEnumerable`1 properties, PropertyExportContext context)
at EPiServer.Core.Transfer.Internal.DefaultContentExporter.Export(IContent content, AccessLevel requiredSourceAccess, IContentTransferContext context, TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContentAndFireEvents(XmlTextWriter xml, ContentReference contentToExport, IContentExporter contentTransfer, IContentTransferContext context, TransferExportOptions options, AccessLevel requiredSourceAccess)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContentRecursive(XmlTextWriter xml, ContentReference contentToExport, IContentExporter contentTransfer, IContentTransferContext context, AccessLevel requiredSourceAccess, TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContentRecursive(XmlTextWriter xml, ContentReference contentToExport, IContentExporter contentTransfer, IContentTransferContext context, AccessLevel requiredSourceAccess, TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContentRecursive(XmlTextWriter xml, ContentReference contentToExport, IContentExporter contentTransfer, IContentTransferContext context, AccessLevel requiredSourceAccess, TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContentRecursive(XmlTextWriter xml, ContentReference contentToExport, IContentExporter contentTransfer, IContentTransferContext context, AccessLevel requiredSourceAccess, TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportContent(TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.ExportRaw(TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.Export(TransferExportOptions options)
at EPiServer.Enterprise.Internal.DefaultDataExporter.Export(Stream stream, IEnumerable`1 sourceRoots, ExportOptions options)
at EPiServer.UI.Admin.ExportData.ExportThread(Object state)

#218664
Mar 18, 2020 6:36
Vote:
 

Anyway, thats not happend all pagetrees. And i think site is migrated from episerver 6 long time ago.

#218665
Mar 18, 2020 6:37
Vote:
 

Anyone ?

#220817
Apr 06, 2020 7:50
Vote:
 

Apologies for a very late reply. Apparently the issue is cause by a faulty data structure. Instead of ContentAssetFolder  => files, you might have ContentAssetFolder  => ContentAssetFolder => files.

I created a bug CMS-30625 so the handling of such data can be improved. 

#311703
Oct 30, 2023 14:57
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.