Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
akirawinz opened this issue Oct 11, 2022 · 2 comments

Comments

@akirawinz
Copy link

akirawinz commented Oct 11, 2022

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
Copy link
Contributor

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants