Why does the Liquid Content API Array return Empty Fields?


Some of the Liquid Content properties that are retrieved via the API may be blank, but those properties have a value in the Content Items. Specifically, there are a couple of dropdown fields that are returning an empty array in the response.

This article explains the behaviour regarding Liquid Content API requests returning empty fields.




In the example below, the Branch Type field is populated in the UI, but in the JSON response, it is empty.




JSON response:



Reproduction Steps

To reproduce the behavior described above, do the following:

  1. Create a new Content Type

  2. Add a few Content Items for the newly created Content Type.

  3. Add a new dropdown field to the existing Content Type.

  4. Save the changes. As expected, all of the previously created Content Items do not have the created field when querying the API.


  5. Visit one of the Content Items (from the Content > Content Library menu in the Persona Bar) and hit the Save button without making any changes to the new dropdown field.

This results in the Content Item having the new field added, but it will be empty. 



The reason the field appears to be populated in the UI is due to it loading the first value for the dropdown from the Content Type data.

This is the expected behavior since the field was not populated after being created, and it would require modifying the field and saving the changes to fill it.

Please note that this only affects previously created items, and all the new Content Items should have the value populated without any problems.



Please sign in to leave a comment.