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

POST to URL ending in /* with :name and no :nameHint should fail if named node exists

    XMLWordPrintableJSON

Details

    Description

      The "Algorithm for Node Name Creation" does not behave as documented here: "http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet(servlets.post)-AlgorithmforNodeNameCreation"

      It adds numbers to nodenames, even though a ":name" form field is supplied, i.e. it performs both steps one and four, while they are said to happen "otherwise".

      Steps to reproduce (this happens also when only the ":name" field gets supplied) - the two last curl commands should make the POST servlet fail:

      curl -F"title=NewNode" http://.../content/N
      ==> Content created /content/N

      curl -F"title=UpdateNode" http://.../content/N
      ==> Content modified /content/N

      curl -F"title=NewNode" -F":nameHint=N" http://.../content/*
      ==> Content created /content/n

      curl -F"title=Bug!" -F":name=N" http://.../content/*
      ==> Content created /content/N_0

      curl -F":name=N" http://.../content/*
      ==> Content created /content/N_1

      Attachments

        Activity

          People

            enorman Eric Norman
            hungerburg Peter Chiochetti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: