strapi-community / strapi-plugin-slugify

A plugin for Strapi Headless CMS that provides the ability to auto slugify a field for any content type.
https://market.strapi.io/plugins/strapi-plugin-slugify
MIT License
45 stars 21 forks source link

article model name not found, all models must be defined in the settings and are case sensitive. #75

Closed akirawinz closed 1 year ago

akirawinz commented 2 years ago

I've follow document and here is my config

 slugify: {
        enabled: true,
        config: {
          contentTypes: {
            article: {
              field: 'slug',
              references: 'title',
            },
          },
        },
      },

and after I enter http://localhost:1337/api/slugify/slugs/artlcle/test

the error show up

"error": {
"status": 400,
"name": "ValidationError",
"message": "article model name not found, all models must be defined in the settings and are case sensitive.",
"details": {}
}

Here is my article schema.json

 "collectionName": "articles",
  "info": {
    "singularName": "article",
    "pluralName": "articles",
    "displayName": "Article",
    "description": ""
  }

where can I get right model name ?

ComfortablyCoding commented 1 year ago

That looks correct, the only reasons a model would not be registered is if the field or reference(s) values are not valid for that model. Their should have been a message logged to the console in these cases though.

Do you have any example repo where I can take a look?

ComfortablyCoding commented 1 year ago

Closing due to no response, will re-open if any follow ups.