Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-6265

Reported bug with duplicating entries in Staging learning path

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 7.0.x
    • Component/s: Staging
    • Labels:
      None
    • Type of Documentation:
      Developer: Tutorials

      Description

      This issue was reported by a community member on Slack. This was the conversation:

      Davide Abbatiello [4:00 AM]

      Hi,

      I have implemented step by step the export/import data handler by following this documentation:

      https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-0/using-staging-and-export-import

      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

        Attachments

          Activity

            People

            • Assignee:
              cody.hoag Cody Hoag
              Reporter:
              cody.hoag Cody Hoag
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package
                7.0.x