no permission to see this field in strapi
Asked Answered
D

5

8

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 .

Developing answered 30/10, 2021 at 19:37 Comment(2)
I got this "no permissions to see this field" after exporting some json at Settings -> Interface for a field that I had just added. The fun part is that I had access to that field minutes before - I could edit it. I fixed this by restarting the server (was not enough) and then doing log out and then log in. A bit weird.Fingerstall
For me restarting the server solved the issue!Honeycutt
H
11

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.

Hummer answered 16/3, 2023 at 5:21 Comment(1)
This worked nicely.All
D
8

You can try following ways, and check if any one of them works -

Method 1

there can always be an issue with Strapi server,

  • I restarted the server manually and it is fixed.

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

Developing answered 30/10, 2021 at 19:37 Comment(1)
Method 3 worked for me with Strapi 4.5.6 - I only changed a field name of a collection content type and re-deployed to heroku -> works.Overestimate
O
1

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:

  • In the deployed version, go to Content-Type Builder
  • Select the content type that contains the field causing problems
  • Click the Configure the view button
  • Change the position of an arbitrary field
  • Click Save

This worked for me and also didn't require a re-deployment of my app.

Overestimate answered 18/2, 2023 at 22:41 Comment(0)
E
0

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.

Electromechanical answered 20/3, 2023 at 2:59 Comment(0)
B
0

After none of the solutions describe here worked for me I found a "quick" way to fix this.

  1. Open the corresponding schema.json of your affected collection:
-src
  |-api
     |- <singularName of collection>
        |- content-types
           |- service
              |- schema.json
  1. Add temporally "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"
    },
    /* [...] */
  }
}
  1. If the field is a relation (manyToMany) open the corresponding collection and repeat the step above for this collection.
  2. Run strapi in development mode: npm run develop (depending on your command defined in package.json.)
  3. Stop the development mode.
  4. Revert back your changes in schema.json files.
  5. Run and stop strapi in development mode again.

This should fix the broken entry in the database. From now on the field should be visible.

Brayer answered 8/8, 2024 at 12:50 Comment(1)
Additional info: This workaround is compatible with Strapi version 4.25.6Brayer

© 2022 - 2025 — McMap. All rights reserved.