Fallback language doesn't work with array fields

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [ x ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

I have a schema that contains a field named groups with the array type (localizable).

While retrieving data use GraphQL, this field only has data if X-Languages in the request headers is the master language (en).

If I change the value of X-Languages to another language - French, for instance, the groups field will return an empty array.

For other fields in the schema, the fallback language is working well. But it’s not working with the array type field.

Expected behavior

The fallback language data should work with the array type field.

Minimal reproduction of the problem

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ x ] Cloud version

Version: [VERSION]

Browser:

  • [ x ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

I am not sure what your expectations are.

Generally, the array type field doesn’t return data from the fallback language.
For example, we have 2 languages (English and French), English is the master language. We have an array type field (localizable), we only fulfill data for English and we would like to use it as default for French as well. We don’t want to fulfill data for French, it will double work.

I see…the problem is that fallbacks only work when a field is not there. An empty array is a valid item.

I have to test whether you can clear the field in the UI to make it work.

1 Like

It works as expected.

I have a content item with 2 array fields:

English:

German

As you can see:

  1. The first clear button is enabled, meaning the value is an empty array.
  2. The second clear button is disabled, meaning the value is “undefined”.

Therefore you get these results: