I built and maintain ringofkeys.org, which uses Dato and Auth0 to allow our members to edit their profiles, which are simple Dato entries. Itās worked very reliably for going on 3 years now across a Gatsby and now NextJS frontend, so first off thank you for building this platform!
Recently my users have been unable to edit profiles, and my Netlify function for updating their profile fields returns the following error response:
I havenāt been able to find any reference to a contentInLocales attribute anywhere in the documentation, so Iām unsure where or how to add this attribute to my payload. Is this is a per-field sort of localization attribute?
I also just retried after updating them to 2.0.0, but I didnāt expect it to change anything and it didnāt.
To make my updates to the profile entries, within the updateKey Netlify function (source code here, sorry I havenāt gotten to migrate it to TS yet), simply passing the new payload from their edited profile field into the client.item.update() function.
This has worked well for a long time, so Iām uncertain what could have changed? We have just one default locale, en, so I donāt know what localization constraint is being imposed here.
However, the old way to do the calls should be compatible with this change, and should not error out.
Are you using the /cma-client-node 2.0.0 to do those calls? Iāll try and reproduce this issue and get back to you as soon as possible.
Thanks @m.finamor! I had been looking at the docs to update a record, and hadnāt traced the error thoroughly enough to determine that itās only required when publishing, which I also do in that function. Iāll add that parameter and check again, then get back here.
No I started seeing the errors even as I continued to use ^1.1.12 of cma-client-node; I only tried bumping the version as a naive last attempt to get a different error. I may be missing something, but it does appear to be a backwards compatibility break.
@m.finamor Iām running into an issue with this command - when i pass [' '] to content_in_locales when trying to publish a record with the API, I keep getting an error with content_in_locales even though all code samples use this value.