Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-7451

The copy of a site creates shared contents instead of duplicate contents

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0M8
    • 4.0M6
    • None
    • None
    • FF

      How to reproduce :

      • in the admin, create a new site from copying a existing site
      • then open the CMS and try to edit the contents
        > I cannot edit the content because it is the content of another site.

          [CMS-7451] The copy of a site creates shared contents instead of duplicate contents

          The copied workflow instance have to be deleted before creation of a new workflow instance.

          Laurence Aumeunier added a comment - The copied workflow instance have to be deleted before creation of a new workflow instance.

          Laurence Aumeunier added a comment - - edited

          The contents are correctly duplicated (they are not shared contents) but their "ametys:site" property was not updating with the new site.

          In fact, there is an error when updating workflow contents, so no more update is done

          Caused by: org.ametys.plugins.repository.AmetysRepositoryException: Cannot call setWorkflowId on an already persisted Content
          	at org.ametys.cms.repository.WorkflowAwareContentHelper.setWorkflowId(WorkflowAwareContentHelper.java:80)
          	at org.ametys.web.repository.content.jcr.ModifiableDefaultWebContent.setWorkflowId(ModifiableDefaultWebContent.java:66)
          	at org.ametys.web.repository.page.CopySiteComponent._reinitWorkflow(CopySiteComponent.java:526)
          	... 95 more
          

          Laurence Aumeunier added a comment - - edited The contents are correctly duplicated (they are not shared contents) but their "ametys:site" property was not updating with the new site. In fact, there is an error when updating workflow contents, so no more update is done Caused by: org.ametys.plugins.repository.AmetysRepositoryException: Cannot call setWorkflowId on an already persisted Content at org.ametys.cms.repository.WorkflowAwareContentHelper.setWorkflowId(WorkflowAwareContentHelper.java:80) at org.ametys.web.repository.content.jcr.ModifiableDefaultWebContent.setWorkflowId(ModifiableDefaultWebContent.java:66) at org.ametys.web.repository.page.CopySiteComponent._reinitWorkflow(CopySiteComponent.java:526) ... 95 more

            laurence Laurence Aumeunier
            llopez Laure Lopez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: