decaporg / decaporg/decap-cms

Nested Collections hierarchy visibility is wrong.

Open
#7,527 3 comments 0 reactions 0 assignees View on GitHub
area: nested-collections type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**EDIT:** rollback to version `3.6.1` and every goes back to normal. And here I thought I was doing something wrong ._.

**Describe the bug**
Nested Collections hierarchy visibility is wrong.

**To Reproduce**

Situation 1: Create the following filesystem structure:
```txt
src/
|-- index.md
|-- abc/
|-- index.md
```

Situation 2: Create the following filesystem structure:
```txt
src/
|-- index.md
|-- abc/
|-- index.md
|-- def/
|-- index.md
```

**Screenshots**

Situation 1: `Tests` collection focused, no `abc` nested collection.

![Image](https://github.com/user-attachments/assets/a2a66298-5ac0-40e8-9009-8b33e5cb5696)

Situation 2: `Tests` collection focused

![Image](https://github.com/user-attachments/assets/d0c60462-9ebe-467c-87bf-bf41be46b723)

`abc` collection focused, no `def` nested collection.

![Image](https://github.com/user-attachments/assets/0c0be680-2afa-43cc-b5aa-214edf37019e)

**Expected behavior**

1. `abc` nested collection should be visibled
2. `abc`/`def` nested collection should be visibled

**Applicable Versions:**

- Decap CMS version: 3.7.1
- Git provider: GitHub, Decap Server
- OS: Fedora KDE 41
- Browser version: LibreWolf, 139.0.4-1

- Node.JS version: none, use CDN

**CMS configuration**

```yml
# ...

collections:
- label: Tests
label_singular: test
name: tests
description: Nested Collections test
folder: "src/tests"
create: true
slug: "{{slug}}"
nested:
depth: 3
summary: "{{slug}}"
summary: "{{dirname}}/{{filename}}.{{extension}}"
extension: md
format: frontmatter
fields:
- { label: "Title", name: "title", widget: "string" }
meta: { path: { widget: string, label: 'Path', index_file: 'index' } }

# ...
```

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.