Try our conversational search powered by Generative AI!

How to delete old pages when importing with DataImporter

Vote:
 

Hi everyone,

I'm trying to implement automated content migration with DataExporter and DataImporter classes. The problem that I've got right now is that DataImporter doesn't delete old items if they don't exist in the export package anymore.

For example, there is container page called "About" and it has several pages inside, say "Contacts", "Support" and "Send feedback". I export that "About" container from A environment to B environment and everything is fine. At some point later "Contacts" and "Support" pages get deleted and new page is created called "Contacts and Support". When export "About" container from A and import it to B then new "Contacts and Support" page gets created in B envirunment but old "Contacts" and "Support" pages are still in environment B. They doen't get deleted.

There is DeleteContent property in DataImporter class. I don't know the purpose of that property and documentation doesn't say much. But if I set some content reference items to that property those don't get deleted during import. Perhaps I'm missing something but I coudn't find any example of that property usage.

Also, manually meleting all content before the import doesn't help, because deliting pages causing items, that have references to those pages, to lose that references.

Any help with this is much appreciated.

#152327
Aug 24, 2016 10:58
* 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.