decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.65k stars 3.02k forks source link

Published content not listed in their collection UI #7148

Open nhoizey opened 3 months ago

nhoizey commented 3 months ago

Describe the bug

I've published some content, they are visible on the live site, but the collection UI tells me there is no content yet.

To Reproduce

See configuration.

Expected behavior

I guess the UI should list the content.

Screenshots

CleanShot 2024-03-16 at 20 41 34@2x

Applicable Versions:

CMS configuration

Here's my collection config:

collections:
  - name: 'blog'
    label: 'Blog'
    label_singular: 'blog'
    folder: 'src/collections/blog'
    path: '{{year}}/{{month}}/{{day}}/{{slug}}'
    slug: '{{slug}}/index'
    summary: '{{title}} ({{day}}/{{month}}/{{year}})'
    create: true
    media_folder: ''
    public_folder: ''
    view_groups:
      - label: Année
        field: date
        pattern: \d{4}
    fields:
      - label: 'Titre'
        name: 'title'
        widget: 'string'
        tagname: 'h1'
      - label: 'Date'
        name: 'date'
        widget: 'datetime'
      - label: 'Image de couverture'
        name: 'image'
        widget: 'image'
        media_folder: ''
        required: false
        tagname: ''
      - label: 'Texte'
        name: 'body'
        widget: 'markdown'
        hint: 'Contenu du billet'
nhoizey commented 3 months ago

To add some information:

If I create a new content, I don't see it either in the collection UI, but I see it in the workflow:

CleanShot 2024-03-16 at 20 53 24@2x

If just after publishing it, I go to the collection UI, it is there:

CleanShot 2024-03-16 at 20 55 08@2x

But after a browser refresh, it is gone, like previously published content.

nhoizey commented 3 months ago

For additional information, I discovered there an experimental support for nested collections, activated it, and the content is indeed listed in the UI:

CleanShot 2024-03-18 at 18 10 38@2x

So I guess this feature could be automatically activated if the path and/or slug contains at least one /.

I still wish I could see the full list of contents of the collection when I didn't select any sub folder.

Juniors017 commented 3 months ago

i have same problem, use you .md or .mdx file format ? have you clear your cache Test in inPrivate page

nhoizey commented 3 months ago

i have same problem, use you .md or .mdx file format ?

I'm using Markdown in *.md files.

have you clear your cache Test in inPrivate page

Yes

elnikkis commented 2 months ago

Are your settings of folder, path, and slug correct? In my case, I had to specify the correct path pattern where the files were located or else nothing would show up.