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

Versions of content are not created at the right time

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.5
    • None
    • None
    • None

      • The current step id should be setted before the checkpoint() in a post function
      • Checkpoint should be handled by a post-function after setting the current step (to be removed from workflow action such as EditionContentFunction, CreateContentFunction

          [CMS-4082] Versions of content are not created at the right time

          Furthermore with this patch we have now the following error:

          Category:	org.ametys.web.synchronization.SynchronizeContentValidationObserver
          Message:		Unable to synchronize workspace with event: event[content.validated, '/ametys-internal:sites/www/ametys-internal:contents/faq-article' (defaultWebContent://a6b3a871-f621-4569-be10-711092d987e1)]
          Location:	org.ametys.runtime.util.SLF4JLogger.error(SLF4JLogger.java:64)
          Thrown:
          javax.jcr.version.VersionException: No version with label 'Live' exists in this version history.
          	at org.apache.jackrabbit.core.version.VersionHistoryImpl.getVersionByLabel(VersionHistoryImpl.java:157)
          	at org.ametys.web.synchronization.SynchronizeContentValidationObserver._internalObserve(SynchronizeContentValidationObserver.java:91)
          	at org.ametys.web.synchronization.AbstractSynchronizeObserver.observe(AbstractSynchronizeObserver.java:87)
          	at org.ametys.cms.observation.ObservationManager.notify(ObservationManager.java:110)
          

          Laurence Aumeunier added a comment - Furthermore with this patch we have now the following error: Category: org.ametys.web.synchronization.SynchronizeContentValidationObserver Message: Unable to synchronize workspace with event: event[content.validated, '/ametys-internal:sites/www/ametys-internal:contents/faq-article' (defaultWebContent: //a6b3a871-f621-4569-be10-711092d987e1)] Location: org.ametys.runtime.util.SLF4JLogger.error(SLF4JLogger.java:64) Thrown: javax.jcr.version.VersionException: No version with label 'Live' exists in this version history. at org.apache.jackrabbit.core.version.VersionHistoryImpl.getVersionByLabel(VersionHistoryImpl.java:157) at org.ametys.web.synchronization.SynchronizeContentValidationObserver._internalObserve(SynchronizeContentValidationObserver.java:91) at org.ametys.web.synchronization.AbstractSynchronizeObserver.observe(AbstractSynchronizeObserver.java:87) at org.ametys.cms.observation.ObservationManager.notify(ObservationManager.java:110)

          Laurence Aumeunier added a comment - - edited

          This is patch to do this on edition and validation action (to be done on all workflow action).

          Before applying this patch:

          • Création => creates version v1.0 with no currentStepId
          • Edition => creates version v1.1 with currentStepId=1
          • Validation => creates version v1.2 with currentStepId=1
          • Edition => creates version v1.3 with currentStepId=3

          After applying this patch:

          • Création => creates version v1.0 with currentStepId=1
          • Edition => creates version v1.1 with currentStepId=1
          • Edition => creates version v1.2 with currentStepId=1
          • Validation => creates version v1.3 with currentStepId=3

          There is still a problem with this patch, the history view is now incorrect

          Laurence Aumeunier added a comment - - edited This is patch to do this on edition and validation action (to be done on all workflow action). Before applying this patch: Création => creates version v1.0 with no currentStepId Edition => creates version v1.1 with currentStepId=1 Validation => creates version v1.2 with currentStepId=1 Edition => creates version v1.3 with currentStepId=3 After applying this patch: Création => creates version v1.0 with currentStepId=1 Edition => creates version v1.1 with currentStepId=1 Edition => creates version v1.2 with currentStepId=1 Validation => creates version v1.3 with currentStepId=3 There is still a problem with this patch, the history view is now incorrect

            ngavalda Nicolas Gavalda (Inactive)
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: