You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've also seen this error and it's probably the missing default-locale causing the issue. In terms of the CMA you need to be aware to provide the proper locales to make it work.
Providing the locale might fix it (en-US is assumed to be the default locale below):
to receive default locale you could do something like:
const locales = await env.getLocales()
const defaultLocale = locales.items.find(locale => locale.default)
// fallback to a "default default" or throw an error , whatever fits your needs
const localeCode = defaultLocale?.code || 'en-US';
let entry = await environment.createEntry('showcase', {
fields: {
title:
[localeCode]: "testing"
}
})
Sadly, neither the legacy api environment.getLocales() nor the plain-interface client.locale.getMany() provides the possibility to filter default locale at request time - although the plain-api provides the query parameter, which is not working.
I'm trying to create an entry:
Can someone explain what the error message means and tell me the solution please?
The text was updated successfully, but these errors were encountered: