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
The document schema has a 'content' property, which is an array of objects, each having a 'term' and 'locale' properties.
We want to order those in the studio by the first content objects' term property. This used to work fine by declaring this ordering:
However this no longer works, we get the following error in Studio:
Error: The current ordering config targeted the nonexistent field "content[0]" on schema type "glossaryTerm". It should be one of slug, content, childTermsRefs, synonyms, relatedTerms
We tried the preview selector syntax content.0.term, but that won't work either. Error: unexpected token "0.", expected expression
It seems impossible to select a property of a nested object within an array for ordering. But that used to work just fine. I would expect the sort order field selector to work the same way as the preview title selector, content.0.term, which works fine.
The document schema has a 'content' property, which is an array of objects, each having a 'term' and 'locale' properties.
We want to order those in the studio by the first content objects' term property. This used to work fine by declaring this ordering:
However this no longer works, we get the following error in Studio:
Error: The current ordering config targeted the nonexistent field "content[0]" on schema type "glossaryTerm". It should be one of slug, content, childTermsRefs, synonyms, relatedTerms
We tried the preview selector syntax
content.0.term
, but that won't work either.Error: unexpected token "0.", expected expression
It seems impossible to select a property of a nested object within an array for ordering. But that used to work just fine. I would expect the sort order field selector to work the same way as the preview title selector,
content.0.term
, which works fine.Reproduction:
Field for ordering
More context -> values are present 👇
a one | a two | b one …
Other orders work (even combinations) 👇 only the nested field is not working
Ordering with
[0]
Ordering with
.0.
(as is the convention for selecting values from arrays in the preview config)The text was updated successfully, but these errors were encountered: