2

Using DEF 2.0.1 and Sitecore 9.0.1, we have a DEF import process that imports items from an API and creates Sitecore items.

Thats works OK until we introduce versions of an item:

But we have fields on the imported data templates that are edited by the content author (believe me - there are valid reasons why they share the template) and should not be overwritten by the DEF and that works fine when the item has only one version ...

But when an author creates a new version, that version has been reported disappear following an import on our Staging server.

Testing locally, when I edit the value of field that isn't managed by the DEF in version 2 of an item and then run a DEF import, Im seeing the value of that field in version 2 being overwritten with the value from version 1. We are using the standard ResolveSitecoreItemStepProcessor.

Has anyone had any experience of working with versions of items and the DEF?

1

We appear to have fixed by changing this line in the the DoSearch method of ResolveSitecoreItemStepProcessor.cs

From

return source.FirstOrDefault<ItemModel>();

To

return source.LastOrDefault<ItemModel>();

If you see any issues with this, please shout out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.