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

Unable to save a content after inserting a content attachment

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • 4.0 alpha
    • None
    • None

      How to reproduce

      • Edit a content
      • Insert a link to an attachment
      • Save
      Caused by: javax.jcr.lock.LockException: Cannot add lock token: lock already held by other session. (lock held by node /ametys:root/ametys-internal:sites/45/7d/www/ametys-internal:contents/2d/e4/nouveau-article-2)
      	at org.apache.jackrabbit.core.lock.LockInfo.throwLockException(LockInfo.java:269)
      	at org.apache.jackrabbit.core.lock.LockManagerImpl.addLockToken(LockManagerImpl.java:766)
      	at org.apache.jackrabbit.core.lock.XALockManager.addLockToken(XALockManager.java:218)
      	at org.apache.jackrabbit.core.lock.SessionLockManager.addLockToken(SessionLockManager.java:95)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata._checkLock(JCRCompositeMetadata.java:1598)
      	at org.ametys.plugins.repository.metadata.jcr.JCRCompositeMetadata.setMetadata(JCRCompositeMetadata.java:919)
      

      The lock token is hold by the workflow action 12 just before saving content.

      If we wait after inserting attachment or try to save again after error, it works well...

      Note that the workflow action 12 is called as soon as we select a file attachment, even if we haven't upload a new attachment.

          [CMS-7288] Unable to save a content after inserting a content attachment

          Laurence Aumeunier made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Raphaël Franchet made changes -
          Fix Version/s Original: 4.1.7 [ 14647 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.1.7 [ 14647 ]
          Fix Version/s Original: 4.1.6 [ 14629 ]
          Raphaël Franchet made changes -
          Fix Version/s New: 4.1.6 [ 14629 ]
          Fix Version/s Original: 4.1.5 [ 14601 ]
          Cédric Damioli made changes -
          Fix Version/s New: 4.1.5 [ 14601 ]
          Fix Version/s Original: 4.1.4 [ 14581 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.4 [ 14581 ]
          Fix Version/s Original: 4.1.3 [ 14549 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.3 [ 14549 ]
          Fix Version/s Original: 4.1.2 [ 14535 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.2 [ 14535 ]
          Fix Version/s Original: 4.1.1 [ 14481 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1.1 [ 14481 ]
          Fix Version/s New: 4.2.0 [ 14425 ]
          Fix Version/s Original: 4.1.0 [ 13987 ]
          Laurence Aumeunier made changes -
          Fix Version/s New: 4.1 [ 13987 ]
          Fix Version/s Original: 4.0RC3 [ 13981 ]

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: