Copied to clipboard

Flag this post as spam?

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


  • Lachlann 344 posts 626 karma points
    Feb 05, 2015 @ 16:40
    Lachlann
    0

    Error recognising null field

    Hello

    I have an old Umbraco 3 website that I have upgraded to 4.6. I am using the Umbraco import adaptor to import data from a section (700 ndes or so) to my shiney new Umbraco 7 CMS. I want to be able to apply a value to a field in new CMS to all imported items from the old CMS, so I am setting the mapping from a field i know to be empty in the old cms and using the default value to populate the new records.

    For some reason cms import does not recognise that the field is empty. The field type in the old CMS is a dropdown, however the null test seems to fail sometimes for textstring fields as well.

    Do you know why this might be? also can you think of a better way for me to be able to define this value without having to rely on the default field, i.e. if i could just blanket define the field without having to test for a null field in the old cms.

    Hope this all makes sense.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 05, 2015 @ 16:55
    Richard Soeteman
    0

    Hi,

    I think this is because empty strings are ignored as well but they should be treated as null values.

    What is the datatype id (guid) you are importing from in 4.6 and the property editor alias you are using in the target implementation?

    Best,

    Richard

  • Lachlann 344 posts 626 karma points
    Feb 05, 2015 @ 17:00
    Lachlann
    0

    Ahh okay,

    So the data type id is 36068afc-564d-11dd-9dae-6aeb55d89593 and it turns out it is an Ultimate picker package and the alias of target property is "postTags"

    L

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 05, 2015 @ 17:29
    Richard Soeteman
    0

    Hi,

    I can't find any datatype with id 36068afc-564d-11dd-9dae-6aeb55d89593 in my environments. Could it be a custom one? Can you make a screenshot of both the source and target datatype easier to get the info out.

    Thanks,

    Richard

  • Lachlann 344 posts 626 karma points
    Feb 05, 2015 @ 17:40
    Lachlann
    0

    I am not sure, this is an upgrade from a Umbraco 3 website so not sure if you would have any  running that :)

    I tried moving the data type to a standard drop down and re exporting but it didnt seem to make a difference, here is a screenshot of the current datatpye (the GUID has changed to the new drop down type)

    Here is the target data type definirtion:

    Hope that helps.

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Feb 06, 2015 @ 09:12
    Richard Soeteman
    0

    Hi,

    I found the real bug. The realy bug was that MNTP was not correctly mapped to the Advanced Field. MNTP Should only show options when the mapped property is a media item, not content. That is fixed now (available in 3.0.1 release) but doesn't solve you issue since you can't specify a default value anymore.

    What you need to do to support default values is write a Field provider for that. The manual describes how you can do that http://soetemansoftware.nl/cmsimport/downloads

    Give yoru FieldProvider a Higf prio and just return the default value you need then CMSImport will take care of the rest. The node with the default value must exists in the list of available items of the MNTP otherwise value can't be mapped and the default value will still be ignored.

    Hope this helps,

    Richard

  • Lachlann 344 posts 626 karma points
    Feb 06, 2015 @ 09:51
    Lachlann
    0

    Hey Richard,

    Thnaks so much for looking into that for me, hope you didnt stay up all night! I will look into the field provider option you mentioned, however i think my budget on this project is nearly up so I may not be able to get round to it.

    Thanks again for your help.

    Lachlann

     

Please Sign in or register to post replies

Write your reply to:

Draft