Sling
  1. Sling
  2. SLING-2108

PostServlet :import operation does not take autoCheckout into account

    Details

      Description

      To reproduce:

      curl -u admin:admin -F":operation=import" -F":contentType=json" -F":content={'person1':{'jcr:primaryType':'nt:unstructured','jcr:mixinTypes':['mix:versionable'], 'surname':'aaa'}}" -F":replaceProperties=true" -F":checkin=true" -F":autoCheckout=true" http://localhost:8080/content/people

      curl -u admin:admin -F":operation=import" -F":contentType=json" -F":content={'person1':{'jcr:primaryType':'nt:unstructured','jcr:mixinTypes':['mix:versionable'], 'surname':'bbb'}}" -F":replaceProperties=true" -F":checkin=true" -F":autoCheckout=true" http://localhost:8080/content/people

      Second request gives "javax.jcr.version.VersionException: Unable to perform operation. Node is checked-in"

      Workaround is to use this in between those requests:

      curl -u admin:admin -F":operation=checkout" http://localhost:4502/content/people/person1

        Activity

        Bertrand Delacretaz created issue -
        Eric Norman made changes -
        Field Original Value New Value
        Assignee Eric Norman [ edn ]
        Hide
        Eric Norman added a comment -

        fixed in revision 1206611

        Show
        Eric Norman added a comment - fixed in revision 1206611
        Eric Norman made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Servlets Post 2.1.2 [ 12315287 ]
        Fix Version/s JCR ContentLoader 2.1.4 [ 12315995 ]
        Resolution Fixed [ 1 ]
        Carsten Ziegeler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12617667 ] Copy of no-reopen-closed,doc-test-required [ 12762678 ]
        Gavin made changes -
        Workflow Copy of no-reopen-closed,doc-test-required [ 12762678 ] no-reopen-closed,doc-test-required [ 12766522 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12766522 ] re-open possible,doc-test-required [ 12787991 ]
        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12787991 ] no-reopen-closed,doc-test-required [ 12792792 ]

          People

          • Assignee:
            Eric Norman
            Reporter:
            Bertrand Delacretaz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development