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
Cannot save a content type using Strapi admin panel UI in 3.1.0 #7139
Comments
Hi ! Have you rebuild your admin panel ? |
Yes I did, can't you reproduce? |
Nope, I can save any content type |
Seems like reseting number fields to 0 or boolean to false is reseting the form to a null value. See link to video: https://www.loom.com/share/1a692e3a9054416aa79d8145e095a9c2 |
I wasn't able to reproduce this. @ralphsomeday is your source code for your project public somewhere? |
@ralphsomeday I am not able to reproduce either can you show us your content type structure? |
{
"kind": "collectionType",
"collectionName": "timeslots",
"info": {
"name": "Timeslot"
},
"options": {
"increments": true,
"timestamps": true
},
"attributes": {
"label": {
"type": "string",
"required": true
},
"fromTimeHours": {
"type": "integer",
"default": 0,
"required": true
},
"fromTimeMinutes": {
"type": "integer",
"default": 0,
"required": true
},
"toTimeHours": {
"type": "integer",
"default": 0,
"required": true
},
"toTimeMinutes": {
"type": "integer",
"default": 0,
"required": true
}
}
}
|
@ralphsomeday can you see if you are using any custom extensions (the |
@derrickmehaffy I have an extension to the users-permissions but not the content-manager. |
Hi guys, @derrickmehaffy @alexandrebodin still stuck even with 3.1.1, any chance you guys have time to look into that issue as I can't use the admin panel and therefore can't upgrade. thanks |
The extension that i have on user-permissions mainly in the settings.json and overriding the jwt token function {
"kind": "collectionType",
"connection": "default",
"collectionName": "users-permissions_user",
"info": {
"name": "user",
"description": ""
},
"options": {
"timestamps": true
},
"attributes": {
"username": {
"type": "string",
"minLength": 3,
"unique": true,
"configurable": false,
"required": true
},
"email": {
"type": "email",
"minLength": 6,
"configurable": false,
"required": true
},
"provider": {
"type": "string",
"configurable": false
},
"password": {
"type": "password",
"minLength": 6,
"configurable": false,
"private": true
},
"resetPasswordToken": {
"type": "string",
"configurable": false,
"private": true
},
"confirmed": {
"type": "boolean",
"default": false,
"configurable": false
},
"blocked": {
"type": "boolean",
"default": false,
"configurable": false
},
"role": {
"model": "role",
"via": "users",
"plugin": "users-permissions",
"configurable": false
},
"profilePicture": {
"model": "file",
"via": "related",
"plugin": "upload",
"required": false
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"cars": {
"via": "drivers",
"collection": "car"
}
}
}
services/jwt.js 'use strict'
/**
* Jwt.js service
*
* @description: A set of functions similar to controller's actions to avoid code duplication.
*/
const _ = require('lodash')
const jwt = require('jsonwebtoken')
// by default the jwt token expiration is set to 120 minutes
const defaultJwtExpireseInValue = '120m'
module.exports = {
issue: (payload, jwtOptions = {}) => {
_.defaults(jwtOptions, { expiresIn: process.env.JWT_TOKEN_EXPIRES_IN || defaultJwtExpireseInValue })
return jwt.sign(
_.clone(payload.toJSON ? payload.toJSON() : payload),
process.env.JWT_SECRET || _.get(strapi.plugins['users-permissions'], 'config.jwtSecret') || 'oursecret',
jwtOptions
)
}
} |
Signed-off-by: soupette <cyril.lpz@gmail.com> Signed-off-by: Gil Fernandes <gil.fernandes@onepointltd.com>
Describe the bug
Upgraded to 3.1.0 and tried to update a record in one of my content types but when I am trying to save nothing happens the UI does not react to the action and the server is not receiving any call from the admin panel. Also when resetting a boolean to false is says value is required.
Steps to reproduce the behavior
Expected behavior
Edit a content type works
System
The text was updated successfully, but these errors were encountered: