Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-4836

Created a design doc that cannot be deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0
    • 2.0-developer-preview-4
    • ns_server
    • Security Level: Public
    • None

    Description

      I used curl to create a design doc but forgot to specify content type json header in request. If I query couchdb _all_docs, I see the doc is there, but I cannot delete the design doc from the UI - nor can I see the views:

      Minor issue, but if it can't be deleted I suppose it shouldn't be created.

      REQUEST =>
      curl http://10.1.2.40:8091/couchBase/default/_design/dev_ddoc1 -X PUT -d@views.json

      {"ok":true,"id":"_design/dev_ddoc1"}

      inside of views.json I have:
      {"_id":"_design/dev_ddoc1","views":{"view1a":{"map":"function (doc)

      {\n emit(doc._id, null);\n}

      "}}}

      LOG =>

      Client-side error-report for user "Administrator" on node 'ns_1@10.1.2.40':
      User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22
      Browser client XHR failure encountered. (age: 1889) Diagnostic info:
      s: {"url":"/couchBase/default/_design/dev_ddoc1?rev=undefined","isLocal":false,"global":true,"type":"DELETE","contentType":"application/json","processData":true,"async":true,"accepts":

      {"xml":"application/xml, text/xml","html":"text/html","text":"text/plain","json":"application/json, text/javascript","*":"*/*","script":"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}

      ,"contents":{"xml":{},"html":{},"json":{},"script":{}},"responseFields":

      {"xml":"responseXML","text":"responseText"}

      ,"converters":

      {"text html":true}

      ,"jsonp":"callback","timeout":30000,"cache":false,"dataType":"json","data":"{}","dataTypes":["text","json"],"crossDomain":false,"hasContent":true}
      xhrStatus: error,
      xhrReadyState: 4,
      errMsg: Bad Request,
      statusCode: 400,
      responseText:

      {"error":"bad_request","reason":"Invalid rev format"}

      full diag attached

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            deepkaran.salooja Deepkaran Salooja
            tommie Tommie McAfee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty