sveltia / sveltia-cms

Alternative to Netlify/Decap CMS. Fast, lightweight, Git-based headless CMS. Modern UX, first-class i18n support, open source & free. Made with Svelte.
MIT License
955 stars 49 forks source link

One folder cannot be used for multiple collections (with filter applied) #201

Closed bmackinney closed 2 months ago

bmackinney commented 2 months ago

steps to reproduce:

  1. checkout the sveltia branch of https://github.com/basa-casa/hugo-admin
  2. hugo server
  3. http://localhost:1313/admin/collections does not display any folder collections (there are a lot) but does display files collections (there are two). both collections have the same filter field but different values (folder or files).
filter: 
  field: collection_type
  value: folder

After changing collections all from "folder" to files, each displays in the files collections entries.

Field collections at http://localhost:1313/admin/fields also do not function.

kyoshino commented 2 months ago

Looks like the filter itself is fine, but the entry listing is confused because folder: data/scms/collections is used for both collections. Fixing.

kyoshino commented 2 months ago

Let me think about how to fix this... Having a many-to-many relationship will affect many parts of the app. 😅

I’m shipping the fixes for #202 and other issues first.

kyoshino commented 2 months ago

I’m also checking for other bugs with your setup. One thing I’ve noticed is, on http://localhost:1313/admin/#/collections/admin-pages/entries/collections, the Add menu checkbox doesn’t work as expected.

kyoshino commented 2 months ago

I have made progress. It’s a major refactoring, so I’ll make sure everything works well.

localhost_1313_admin_collections_

kyoshino commented 2 months ago

The fix landed in v0.39.9. I’ll work on remaining hugo-admin compatibility issues later this week.