You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Andrea Brancatelli <ab...@schema31.it.INVALID> on 2020/06/15 12:44:33 UTC
design document with no name
I really don't know how but one of my developers succeeded, by using
Photon, in creating a design document with an empty ID.
Needless to say this broke almost everything like any Post to this
database with:
[error] 2020-06-15T12:35:00.511174Z couchdb@127.0.0.1 <0.24049.1262>
-------- could not load validation funs
{{nocatch,{illegal_docid,<<"Illegal document id
`_design/`">>}},[{couch_doc,validate_docid,1,[{file,"src/couch_doc.erl"},{line,213}]},{couch_doc,transfer_fields,3,[{file,"src/couch_doc.erl"},{line,252}]},{couch_doc,get_validate_doc_fun,1,[{file,"src/couch_doc.erl"},{line,399}]},{ddoc_cache_entry_validation_funs,'-recover/1-fun-0-',1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,35}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1250}]},{ddoc_cache_entry_validation_funs,recover,1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,34}]},{ddoc_cache_entry,do_open,1,[{file,"src/ddoc_cache_entry.erl"},{line,297}]}]}
I can't edit the document, I can't delete the document because the
server says that _design/ is an illegal id name.
I strongly agree with him :-)
Luckily this is a Development Database so I guess I'll drop the whole
thing and start from scratch, but maybe there's a bug in the validation
code for new design documents?
I tried to reproduce the thing but I wasn't able to do it...
--
Andrea Brancatelli
Schema31 S.p.a.
Re: design document with no name
Posted by ermouth <er...@gmail.com>.
Reproduced in CouchDB 2.x and 3.x. Photon blocks saving those kind of
ddocs from Mango index editor since v1.10.10 that was released just now.
See https://github.com/ermouth/couch-photon/issues/26 for details.
For those who use Photon for creating Mango indices: do update.
Andrea, thanks for reporting.
ermouth
Re: design document with no name
Posted by Andrea Brancatelli <ab...@schema31.it.INVALID>.
{"couchdb":"Welcome","version":"2.3.1","git_sha":"c298091a4","uuid":"a9c59fa2023151b05f880669de8e31ed","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"FreeBSD"}}
---
Andrea Brancatelli
Schema31 S.p.a.
Chief Technology Officier
Tel: +39-06-98358472
Cell: +39-3312488468
Società del Gruppo OVIDIO TECH S.R.L.
On 2020-06-16 10:18, Jan Lehnardt wrote:
> Heya Andrea,
>
> Which version of CouchDB is this?
>
> Best
> Jan
> _
>
> On 15. Jun 2020, at 14:54, Andrea Brancatelli <ab...@schema31.it.INVALID> wrote:
>
> Sorry the attachment got lost along the way:
>
> http://storage.gcloud.schema31.it/obj/9d6870890a00-1608-ae11-70fa-57153e15
>
> ---
>
> Andrea Brancatelli
> Schema31 S.p.a.
>
> On 2020-06-15 14:44, Andrea Brancatelli wrote:
>
> I really don't know how but one of my developers succeeded, by using Photon, in creating a design document with an empty ID.
>
> Needless to say this broke almost everything like any Post to this database with:
>
> [error] 2020-06-15T12:35:00.511174Z couchdb@127.0.0.1 <0.24049.1262> -------- could not load validation funs {{nocatch,{illegal_docid,<<"Illegal document id `_design/`">>}},[{couch_doc,validate_docid,1,[{file,"src/couch_doc.erl"},{line,213}]},{couch_doc,transfer_fields,3,[{file,"src/couch_doc.erl"},{line,252}]},{couch_doc,get_validate_doc_fun,1,[{file,"src/couch_doc.erl"},{line,399}]},{ddoc_cache_entry_validation_funs,'-recover/1-fun-0-',1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,35}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1250}]},{ddoc_cache_entry_validation_funs,recover,1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,34}]},{ddoc_cache_entry,do_open,1,[{file,"src/ddoc_cache_entry.erl"},{line,297}]}]}
>
> I can't edit the document, I can't delete the document because the server says that _design/ is an illegal id name.
>
> I strongly agree with him :-)
>
> Luckily this is a Development Database so I guess I'll drop the whole thing and start from scratch, but maybe there's a bug in the validation code for new design documents?
>
> I tried to reproduce the thing but I wasn't able to do it...
>
> --
>
> Andrea Brancatelli
> Schema31 S.p.a.
Re: design document with no name
Posted by Jan Lehnardt <ja...@apache.org>.
Heya Andrea,
Which version of CouchDB is this?
Best
Jan
_
> On 15. Jun 2020, at 14:54, Andrea Brancatelli <ab...@schema31.it.INVALID> wrote:
>
> Sorry the attachment got lost along the way:
>
> http://storage.gcloud.schema31.it/obj/9d6870890a00-1608-ae11-70fa-57153e15
>
> ---
>
> Andrea Brancatelli
> Schema31 S.p.a.
>
> On 2020-06-15 14:44, Andrea Brancatelli wrote:
>
>> I really don't know how but one of my developers succeeded, by using Photon, in creating a design document with an empty ID.
>>
>> Needless to say this broke almost everything like any Post to this database with:
>>
>> [error] 2020-06-15T12:35:00.511174Z couchdb@127.0.0.1 <0.24049.1262> -------- could not load validation funs {{nocatch,{illegal_docid,<<"Illegal document id `_design/`">>}},[{couch_doc,validate_docid,1,[{file,"src/couch_doc.erl"},{line,213}]},{couch_doc,transfer_fields,3,[{file,"src/couch_doc.erl"},{line,252}]},{couch_doc,get_validate_doc_fun,1,[{file,"src/couch_doc.erl"},{line,399}]},{ddoc_cache_entry_validation_funs,'-recover/1-fun-0-',1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,35}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1250}]},{ddoc_cache_entry_validation_funs,recover,1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,34}]},{ddoc_cache_entry,do_open,1,[{file,"src/ddoc_cache_entry.erl"},{line,297}]}]}
>>
>> I can't edit the document, I can't delete the document because the server says that _design/ is an illegal id name.
>>
>> I strongly agree with him :-)
>>
>> Luckily this is a Development Database so I guess I'll drop the whole thing and start from scratch, but maybe there's a bug in the validation code for new design documents?
>>
>> I tried to reproduce the thing but I wasn't able to do it...
>>
>> --
>>
>> Andrea Brancatelli
>> Schema31 S.p.a.
Re: design document with no name
Posted by Andrea Brancatelli <ab...@schema31.it.INVALID>.
Sorry the attachment got lost along the way:
http://storage.gcloud.schema31.it/obj/9d6870890a00-1608-ae11-70fa-57153e15
---
Andrea Brancatelli
Schema31 S.p.a.
On 2020-06-15 14:44, Andrea Brancatelli wrote:
> I really don't know how but one of my developers succeeded, by using Photon, in creating a design document with an empty ID.
>
> Needless to say this broke almost everything like any Post to this database with:
>
> [error] 2020-06-15T12:35:00.511174Z couchdb@127.0.0.1 <0.24049.1262> -------- could not load validation funs {{nocatch,{illegal_docid,<<"Illegal document id `_design/`">>}},[{couch_doc,validate_docid,1,[{file,"src/couch_doc.erl"},{line,213}]},{couch_doc,transfer_fields,3,[{file,"src/couch_doc.erl"},{line,252}]},{couch_doc,get_validate_doc_fun,1,[{file,"src/couch_doc.erl"},{line,399}]},{ddoc_cache_entry_validation_funs,'-recover/1-fun-0-',1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,35}]},{lists,flatmap,2,[{file,"lists.erl"},{line,1250}]},{ddoc_cache_entry_validation_funs,recover,1,[{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,34}]},{ddoc_cache_entry,do_open,1,[{file,"src/ddoc_cache_entry.erl"},{line,297}]}]}
>
> I can't edit the document, I can't delete the document because the server says that _design/ is an illegal id name.
>
> I strongly agree with him :-)
>
> Luckily this is a Development Database so I guess I'll drop the whole thing and start from scratch, but maybe there's a bug in the validation code for new design documents?
>
> I tried to reproduce the thing but I wasn't able to do it...
>
> --
>
> Andrea Brancatelli
> Schema31 S.p.a.
Re: design document with no name
Posted by Andrea Brancatelli <ab...@schema31.it.INVALID>.
CouchDB 2.3.1
Vendor FreeBSD
Welcome msg Welcome
Aux features pluggable-storage-engines, scheduler
Photon 1.9 Build 36, 2020-04-20
Photon addons cw.Sys.JSON 2.7.17
cw.Couch.Monitor 2.1.58
---
Andrea Brancatelli
Schema31 S.p.a.
Chief Technology Officier
Tel: +39-06-98358472
Cell: +39-3312488468
Società del Gruppo OVIDIO TECH S.R.L.
On 2020-06-15 22:39, ermouth wrote:
>> creating a design document with an empty ID
>
> This CouchDB bug was filed long ago
> https://github.com/apache/couchdb/issues/1472, dunno was it fixed.
>
> Btw, please provide your version of CouchDB and Photon.
>
> ermouth
Re: design document with no name
Posted by ermouth <er...@gmail.com>.
> creating a design document with an empty ID
This CouchDB bug was filed long ago
https://github.com/apache/couchdb/issues/1472, dunno was it fixed.
Btw, please provide your version of CouchDB and Photon.
ermouth