Reputation: 237
I am unable to enter data to fields which I have created in user collection type in strapi.
I wanted to create extra fields in user collection in strapi so I created some extra fields from builder , but when trying to enter data , the newly created fields are not editable .
Upvotes: 9
Views: 9160
Reputation: 521
Ohh... I found a problem in my case. When you create a new field for an entity you should setup access to this field for a particular role:
Upvotes: 0
Reputation: 830
After none of the solutions describe here worked for me I found a "quick" way to fix this.
schema.json
of your affected collection:-src
|-api
|- <singularName of collection>
|- content-types
|- service
|- schema.json
"required": true,
to the field under attributes:{
"kind": "collectionType",
"collectionName": "xxx",
"info": {
"singularName": "xxx",
"pluralName": "xxxs",
"displayName": "XXX",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
/* [...] */
"yourFieldName": {
"type": "relation",
"required": true, // <== ADD HERE!
"relation": "manyToMany",
"target": "api::yyy.yyy",
"inversedBy": "zzz"
},
/* [...] */
}
}
npm run develop
(depending on your command defined in package.json
.)schema.json
files.This should fix the broken entry in the database. From now on the field should be visible.
Upvotes: 0
Reputation: 1
I got this issue after updating to the 3.6.11 version. Try to remove .cache and build folders and rebuild the app. This worked for me.
Upvotes: 0
Reputation: 594
This issue generally occurs when new fields are added to existing content types.
In my case, Simply signing out and logging in back in with your Admin account solves the issue. This will reset the permission issue for newly created fields.
Upvotes: 13
Reputation: 7856
After I ran into the issue multiple times myself and couldn't fix it even after re-deploying again (and again...), I found the following worked for me:
Content-Type Builder
Configure the view
buttonSave
This worked for me and also didn't require a re-deployment of my app.
Upvotes: 1
Reputation: 237
You can try following ways, and check if any one of them works -
Method 1
there can always be an issue with Strapi server,
Method 2
your user might not have permission to view that field. you can change permission of a user by -
step 1 - Login to your strapi cms with Admin account and check if you are able to edit that field(the one with no permission), if so then continue with following steps, else this method wont work for you.
setp 2 - click on settings in left panel , select the user , from the list select the user that you want to change permission with, give read write , and other permissions you want to give.
re-login with your account from which you were facing the problem, it should work now
Method 3
There might be a sync issue with your DB, sometimes your data is not synced with your DB, try deleting the field and re creating it.
I hope one of this solves your issue
Upvotes: 8