Validation error "Path '..' already exists" on meta path field with nested collections and subfolders disabled
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
When using a nested collection and the `subfolders: false` option (from #7387 in 3.6.2), creating or editing any content with the meta `path` field shows an error: `Path 'directory' already exists`
**To Reproduce**
1. Open the dev-test or demo site and open the Pages > Directory > Another Sub Directory collection ([direct demo link](https://demo.decapcms.org/#/collections/pages/filter/directory/another-sub-directory))
2. Click on New Page
3. Enter a page title and click Save
**Expected behavior**
The page is saved successfully at the path `directory/another-sub-directory/2025...test` using the `path` and page slug.
**Screenshots**
An error on the 'Path' field: `Path 'directory/another-sub-directory' already exists`
**Applicable Versions:**
- Decap CMS version: 3.7.1
- Git provider: Test Backend (first seen on GitHub backend)
- OS: OS X
- Browser version Chrome 138
**CMS configuration**
Reproduced using the [test backend](https://github.com/decaporg/decap-cms/blob/decap-cms%403.7.1/dev-test/config.yml).
Contributor guide
Assessment
This issue has not been assessed yet.