Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2108

PostServlet :import operation does not take autoCheckout into account

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            enorman Eric Norman
            bdelacretaz Bertrand Delacretaz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment