Contentful logo

Contentful Community

Unable to save null or empty array for a locale

We are using locale inheritance, and there are certain fields that we do not want inherited. We are programmatically setting them to null for specific locales, which is working well. Our issue is with a list of references. When trying to set null or an empty list, the value is not saved, which causes the fallback content to be inherited. Further to that, if i have an entry on the localized version, and save the empty list, nothing at all comes back from the api and the fallback again kicks in. How can I save a value through the Management API that will let us break inheritance for an array field?

The situation you describe is a very particular corner case. My suggestion would be to create an ‘empty’ entry to be referenced to avoid the fallback to kick-in. I know it’s not optimal, but I think it should work.

When I mean an empty entry, I mean also that probably you would need to create a specific Content-type to have just a title and a description (where you could store an error message for example).