System Information
- Strapi Version: 4.11.2
- Operating System: Manjaro 23.0.0
- Database: Postgres
- Node Version: v18.16.0
- NPM Version: 9.7.2
- Yarn Version: 1.22.19
I recently upgraded from Strapi 4.9.0 to 4.11.2. In doing so, I’ve lost the ability for custom fields in users-permissions.user. When I create a new field or fields on the user content-type, the changes are immediately lost in the admin UI.
There are no errors in the console.
Welcome back!
To manage your project 🚀, go to the administration panel at:
http://localhost:1337/admin
To access the server ⚡, go to:
http://localhost:1337
[2023-06-27 04:45:29.946] http: GET plugin:plugin/admin/plugins/content-type-builder/content-types/plugin::users-permissions.user (24 ms) 200
[2023-06-27 04:45:30.114] http: GET /admin/project-type (8 ms) 200
[2023-06-27 04:45:30.247] http: POST /admin/renew-token (11 ms) 200
[2023-06-27 04:45:30.253] http: GET /admin/init (4 ms) 200
[2023-06-27 04:45:30.431] http: GET /admin/users/me (66 ms) 200
[2023-06-27 04:45:30.450] http: GET /admin/information (88 ms) 200
[2023-06-27 04:45:30.457] http: GET /admin/users/me/permissions (94 ms) 200
[2023-06-27 04:45:30.494] http: GET /i18n/locales (30 ms) 200
[2023-06-27 04:45:30.580] http: GET /content-type-builder/components (28 ms) 200
[2023-06-27 04:45:30.595] http: GET /content-type-builder/reserved-names (37 ms) 200
[2023-06-27 04:45:30.612] http: GET /content-type-builder/content-types (57 ms) 200
[2023-06-27 04:48:16.033] http: GET plugin:plugin/admin/plugins/content-type-builder/content-types/plugin::users-permissions.user (2 ms) 200
[2023-06-27 04:48:16.173] http: GET /admin/project-type (2 ms) 200
[2023-06-27 04:48:16.286] http: POST /admin/renew-token (3 ms) 200
[2023-06-27 04:48:16.290] http: GET /admin/init (3 ms) 200
[2023-06-27 04:48:16.437] http: GET /admin/information (43 ms) 200
[2023-06-27 04:48:16.455] http: GET /admin/users/me (59 ms) 200
[2023-06-27 04:48:16.462] http: GET /admin/users/me/permissions (67 ms) 200
[2023-06-27 04:48:16.485] http: GET /i18n/locales (22 ms) 200
[2023-06-27 04:48:16.571] http: GET /content-type-builder/components (32 ms) 200
[2023-06-27 04:48:16.592] http: GET /content-type-builder/content-types (50 ms) 200
[2023-06-27 04:48:16.610] http: GET /content-type-builder/reserved-names (64 ms) 200
[2023-06-27 04:49:23.467] info: File changed: /home/chris/Documents/strapi/src/extensions/users-permissions/content-types/user/schema.json
[2023-06-27 04:49:23.468] http: PUT /content-type-builder/content-types/plugin::users-permissions.user (41 ms) 201
The server is restarting
Project information
┌────────────────────┬──────────────────────────────────────────────────┐
│ Time │ Tue Jun 27 2023 04:49:26 GMT-0800 (Alaska Dayli… │
│ Launched in │ 1182 ms │
│ Environment │ development │
│ Process PID │ 347526 │
│ Version │ 4.11.2 (node v18.16.0) │
│ Edition │ Community │
│ Database │ postgres │
└────────────────────┴──────────────────────────────────────────────────┘
Actions available
Welcome back!
To manage your project 🚀, go to the administration panel at:
http://localhost:1337/admin
To access the server ⚡, go to:
http://localhost:1337
My first thought was that something with the upgrade was causing the problem. I found out that there was in fact some changes that are likely to be affecting. https://docs.strapi.io/dev-docs/migration/v4/migration-guide-4.10.1-to-4.11.0
I went ahead and installed the new config. (./config/plugins.js)
module.exports = ({
env
}) => ({
// (...)
"users-permissions": {
config: {
register: {
allowedFields: [
"gigachad",
"supreme"
],
}
},
},
});
After restarting Strapi, I tried creating the two fields again. Unfortunately, I was seeing the same behavior as before, where my changes were immediately lost.
Is there some other migration step that I need to carry out in order to preserve my custom fields?