Description
When creating a new post that contains front matter fields of type TEXT, leaving one of these fields empty and saving the post multiple times causes the field value to change unexpectedly.
The first save behaves correctly. However, after the post is saved a second time, the previously empty field is written as [] instead of remaining empty.
This creates an empty array. When the field is rendered on the website, the value is displayed as “Array” rather than as an empty string.
If text is subsequently entered into the field, it is stored as an element within the array instead of as a normal text value.
Expected behaviour
- Saving a post with an empty TEXT field should leave the field empty.
- Saving the post multiple times should not change the field type or value.
- If text is entered later, it should be stored as a normal text string.
Actual behaviour
- After the post is saved a second time, an empty TEXT field is changed to
[]. - If text is later entered into the field, it is stored as an array element rather than as plain text.
- When rendered on the website, the field displays “Array” instead of the expected text.
Steps to reproduce
- Create a new post.
- Leave a TEXT field empty.
- Save the post.
- Make any change to the post (or simply save it again).
- Save the post a second time.
- Observe that the previously empty field now contains
[]. - Enter text into that field and save again.
- Observe that the text is stored as an array element rather than as plain text.
File Contents
-
Screenshot 1: Post after the initial save, showing the empty field stored correctly.
-
Screenshot 2: Post after the second save, showing the empty field changed to
[].
-
Screenshot 3: Post after entering text, showing the value stored as an array element.


