decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Published content not listed in their collection UI

Open nhoizey opened this issue 11 months ago • 5 comments

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:

  • Decap CMS version: 3.1.3
  • Git provider: GitHub (private repo)
  • Browser version: doesn't work in any browser
  • Node.JS version: 21

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 avatar Mar 16 '24 19:03 nhoizey

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 avatar Mar 16 '24 19:03 nhoizey

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.

nhoizey avatar Mar 18 '24 17:03 nhoizey

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

Juniors017 avatar Apr 02 '24 15:04 Juniors017

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

nhoizey avatar Apr 02 '24 15:04 nhoizey

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.

elnikkis avatar Apr 15 '24 10:04 elnikkis