This issue was reported by a community member on Slack. This was the conversation:
Davide Abbatiello [4:00 AM]
I have implemented step by step the export/import data handler by following this documentation:
The documentation is clear and everything worked perfectly.
I saw that on this page (https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/creating-the-entry-staged-model-data-handler) after the doImportStagedModel is not mentioned with a "Note" to update "addEntry" method of local Service with "entry.setUuid(serviceContext.getUuid());" (example: https://github.com/liferay/liferay-portal/blob/master/modules/apps/blogs/blogs-service/src/main/java/com/liferay/blogs/service/impl/BlogsEntryLocalServiceImpl.java#L335) and this in a staging environment duplicate the records after publication.
Am I missing something?
Cody Hoag [9:29 AM]
@Davide Abbatiello just to clarify, are you saying that following the current instructions duplicates the records after publication? Or that the default instructions work, but following the Blogs example (i.e., `entry.setUuid(serviceContext.getUuid());`) introduces the duplicating issue?
Davide Abbatiello [9:45 AM]
Hi @codyhoag, the instruction entry.setUuid(serviceContext.getUuid()); is required in order to don't have duplicate records in a staging environment. My suggestion is only to add a note into the documentation.
Without this instruction we had records with different uuid between staging and live