Copied to clipboard

Flag this post as spam?

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


  • Pavel 2 posts 82 karma points
    Oct 18, 2017 @ 12:28
    Pavel
    0

    Issue with exporting content

    Hello! When exporting content, I faced issues for some of it. Stack trace is given below. My umbraco version is 7.5.8 and I use usync 3.3.4.740 (both core and content). Could you please help to find out what is the problem?

    2017-10-18 15:16:18,501 [P12968/D2/T48] WARN Jumoo.uSync.Content.ContentHandler - Error saving Content: System.InvalidOperationException: The current pre-value collection is array based, use the PreValuesAsArray property instead at Umbraco.Core.Models.PreValueCollection.get_PreValuesAsDictionary() at Jumoo.uSync.Core.Mappers.ContentDataTypeMapper.GetExportValue(Int32 dataTypeDefinitionId, String value) at Jumoo.uSync.Core.Serializers.ContentBaseSerializer1.GetExportIds(PropertyType propType, XElement value) at Jumoo.uSync.Core.Serializers.ContentBaseSerializer1.SerializeBase(IContentBase item, String contentTypeAlias) at Jumoo.uSync.Core.Serializers.ContentSerializer.SerializeCore(IContent item) at Jumoo.uSync.Content.ContentHandler.ExportItem(IContent item, String path, String rootFolder)

    P.S. I understand that prop. types are not supported, but how to make it at least ignore the property value, instead of just failing.

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Oct 18, 2017 @ 14:22
    Kevin Jump
    100

    Hi

    do you happen to know what property value is causing this ? it looks like its a datatype value is failing to be mapped properly :(

    you can turn mapping for types on or off in the config/uSyncCore.config file - it has all the default and quite a few custom datatype mappers in there .

    based on the error you are getting i think it will be one of these

    <uSyncContentMapping Alias="Umbraco.DropDownList" Mapping="DataType" />
    <uSyncContentMapping Alias="Umbraco.DropDown" Mapping="DataType" />
    <uSyncContentMapping Alias="Umbraco.DropDownMultiple" Mapping="DataType" />
    <uSyncContentMapping Alias="Umbraco.CheckBoxList" Mapping="DataType" />
    

    If usync finds a mapper then it will attempt to Get the export value, but if you comment one of them out of this file (and restart your site) - then that property type shouldn't be mapped.

    It would be good if you could identify the type causing this though as I would be keen to fix it.

    if you want more information in the logs you can turn debugging on for usync by adding the following to config/log4net.config

      <logger name="Jumoo.uSync">
        <level value="Debug">
      </logger>
    

    Kevin

  • Pavel 2 posts 82 karma points
    Oct 18, 2017 @ 14:52
    Pavel
    0

    Yes, the error occured because of this string

    <uSyncContentMapping Alias="Umbraco.CheckBoxList" Mapping="DataType" />
    

    ContentDataTypeMapper tried to call PreValuesAsDictionary for checkboxlist prevalues, but they did not appear to be dictionary, if I understood it correctly. After commenting this string, everything worked. Thanks a lot!

Please Sign in or register to post replies

Write your reply to:

Draft