Error 400 when enable localization for content types

System Information
  • Strapi Version: 3.6.0
  • Operating System: macOS Big Sur
  • Database: SQLite
  • Node Version: 14.15.0
  • NPM Version: 6.14.8
  • Yarn Version: 1.22.5

Hello I added another locale, went to the content type builder, created a new content type and clicked ‘enable localization for this content types’. An error occured with “debug POST /content-type-builder/content-types (28 ms) 400”.

I have directy migrated from 3.5.3 to 3.6.0 and installed the i18n plugin before accessing the admin panel.

Upgraded to 3.6.1, error still persists.

Can you give the full error message from the network tab in your browsers devtools?

Object { err: Response }

​

err: Response { type: "basic", url: "http://localhost:1337/content-type-builder/content-types", redirected: false, … }

​​

body: ReadableStream { locked: true }

​​

bodyUsed: true

​​

headers: Headers { }

​​

ok: false

​​

payload: Object { error: {…} }

​​​

error: Object { "contentType.attributes.test": (1) […], contentType: (1) […] }

​​​​

contentType: Array [ "contentType field cannot have keys not specified in the object shape" ]

​​​​​

0: "contentType field cannot have keys not specified in the object shape"

​​​​​

length: 1

​​​​​

<prototype>: Array []

​​​​

"contentType.attributes.test": Array [ "contentType.attributes.test field cannot have keys not specified in the object shape" ]

​​​​​

0: "contentType.attributes.test field cannot have keys not specified in the object shape"

​​​​​

length: 1

​​​​​

<prototype>: Array []

​​​​

<prototype>: Object { … }

​​​

<prototype>: Object { … }

​​

redirected: false

​​

status: 400

​​

statusText: "Bad Request"

​​

type: "basic"

​​

url: "http://localhost:1337/content-type-builder/content-types"

Seems there is also an open issue (8324) on Github.

Is your project code somewhere public that I can view and try to reproduce? (GitHub) if it’s private and you are willing to add me to the repo my GitHub username is derrickmehaffy.

Or if you can compress it and PM me a link to it that would be great.

Invite sent, thank you!

It appears you have extended the content-manager plugin controllers and I couldn’t even start the application as there is a syntax error in api/product-category/models/product-category.js on line 17/24/30 (the ?).

But the primary problem is in: extensions/content-type-builder/controllers/ContentTypes.js you will need to compare your version to ours on GitHub (extensions are mentioned in our update guide here: Update Strapi version - Strapi Developer Documentation )

1 Like

Thanks it works right now.