Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1636

Views code in design documents missing the "language" property cannot be updated via futon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Cannot Reproduce
    • 1.2
    • None
    • Futon
    • New Contributors Level (Easy)

    Description

      As reported by Lleïr Borras (http://tu.llegeix.me/), it is not possible to update a materialized view code through the Futon if its design document does not contain the "language" property.

      On such a design document, when clicking "Save" in the the "database.html?db/_design/doc/_view/name" page, the following error occurs:

      Cannot save view because the design document language is "undefined", not "javascript".

      But, in the server code[1], "javascript" is the default value for the language property if it is undefined: so, I think that the correct solution is to make the futon implement the same behavior.

      [1]: https://github.com/apache/couchdb/blob/master/src/couchdb/couch_query_servers.erl#L327

      Attachments

        Activity

          People

            Unassigned Unassigned
            vjt Marcello Barnaba
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: