-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pages outside of 'path' are also listed in collections #4884
Comments
I can confirm. Seems like a bug. I'll look into it. |
@erezrokah I'm trying to replicate it in dev-test demo. This doesn't work. Any idea what am I doing wrong? :) window.repoFiles = {
_test: {
post1: {
'index.md': {
content: '---\ntitle: "post1"\n---\n',
}
},
post2: {
'index.md': {
content: '---\ntitle: "post2"\n---\n',
}
},
post3: {
'index.md': {
content: '---\ntitle: "post3"\n---\n',
}
}
}
} collections:
- name: 'test'
label: 'Test'
folder: '_test'
path: '{{slug}}/index'
fields:
- { label: 'Title', name: 'title', widget: 'string' } |
I'm not sure @smashercosmo as each backend handles nested collections a bit different. |
Ok, I have to admit this is more complicated than I expected. I understand where this issue comes from (currently we only care about 'depth' and not take into account the actual custom collection path), but in order to fix it properly, I need to have very good understanding of how custom collection paths and nested collections and i18n works together. The issue is not critical so I would wait for when we get rid of immutable everywhere and convert everything to typescript so that code will be easier to follow and debug. |
Describe the bug
A folder collection with
path
specified as{{slug}}/index
also lists pages infolder
that are not in a subdirectory.To Reproduce
Expected behavior
I expect that if
path
is specified with a/
, then all posts/pages that do not fulfill this requirement should be ignored and not listed.Applicable Versions:
CMS configuration
https://github.com/lbischof/issue-4884
The text was updated successfully, but these errors were encountered: