bobdenotter / configuration-notices

💡 A small tool to point out common pitfalls for Bolt 4 configuration settings
MIT License
9 stars 4 forks source link

Show warning if slug field is missing in a CT #10

Closed I-Valchev closed 3 years ago

I-Valchev commented 3 years ago

And also.. this makes me cringe a little, but.. I guess it's possible to have more than one field of type slug?

As in, there's Bolt's page slug, but also there can be another field that is used downstream in the API...

Anyhow, whether or not we should allow a CT with multiple slugs is a discussion for bolt/core.

develth commented 3 years ago

This PR results into configuration warnings about static slugs:

The ContentType Über has a slug field 'slug', which does not define the uses attribute.

For e.g. this type:

about:
  name: Über
  singular_name: Über
  fields:
    title:
      type: text
      class: large
      group: content
      localize: false
      label: Titel
  slug: "ueber"
  record_template: "about.html.twig"
  singleton: true