Can't save admin configuration for users-permissions plugin

System Information
  • Strapi Version: 3.5.4/3.5.2
  • Operating System: Ubuntu 18.04
  • Database: MongoDB
  • Node Version: 14

Hi guys. Weird stuff, any ideas?

Can’t save the page layout here /content-manager/content-types/plugins::users-permissions.user/configuration. I’m seeing the following error in devtools:
{“statusCode”:400,“error”:“Bad Request”,“message”:{“name”:“validationError”,“errors”:[“settings.defaultSortBy must be one of the following values: id, email, confirmed, blocked, role, username, createdAt, updatedAt”]},“data”:{“name”:“validationError”,“errors”:[“settings.defaultSortBy must be one of the following values: id, email, confirmed, blocked, role, username, createdAt, updatedAt”]}}

Can’t reproduce the bug on my windows development configuration. It occurs only after server deployment (I’m using docker).

I tried downgrading to the previous Strapi version. As well as going back in my commit history. Nothing helps to clear that out. I can still save layout changes for other entities. But the one doesn’t work is user.

P.S. Didn’t put it as an issue to Github just because it’s hard to reproduce.

I remember it was a bug in that particular strapi version, try to update to the latest.

What does it mean ? You combine somehow two versions or this bug occurs in two different apps with two different strapi versions?

I simply tried to downgrade version with the same app. But can’t really catch at what moment that started happening.

Have you tried to delete .cache and build folders and rebuild the project again? Do you use extensions for users-permissions plugin?

I’m using dokku and each time the strapi app is deployed on a fresh container (if I understand that right), so maybe deleting .cache is not my case.

No, I’m not using extensions for the plugin. I tried removing the users-permissions folder completely, but that doesn’t make any difference.

Btw! I didn’t mention that for some reason “defaultSortBy” in my case is set to “provider”. Which is wrong. Does it mean it’s in the database already? I can’t change this value, the described error happens.

Thanks, but didn’t work for me.

What is provider in that case? Relationship field?

It’s one of the default attributes in User.settings.json.

In my case “provider” is “local”.

I’ve tried to start with a clean database and the error has gone!

Now there’s a question how did the wrong settings emerged and how to fix the production db.

Now you can export the configs from local and import them in production. That should fix the issue.

That helped, thanks!

1 Like