-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: core:content-managerSource is core/content-manager packageSource is core/content-manager packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Bug report
Describe the bug
I have a JSON data field in one of my content types. It works perfectly fine until the number of fields inside the JSON object is either 8 or less than 8. As soon as I introduce field number 9, the order of JSON fields gets changed.
Steps to reproduce the behavior
- Add a JSON data field in your content type
- Go to your content type and create an entry
- Add some valid JSON for the JSON field, it works fine until the number of fields inside the JSON object is either 8 or less than 8
- Added field number 9 and the ordering of fields will get changed.
Expected behavior
The ordering of fields should not change. Items should be ordered as entered.
Code snippets
Let’s say I have a Person type JSON-LD object and I add only 8 fields in this format:
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Jane Doe",
"url": "http://www.janedoe.com",
"sameAs": "sdfsdfsdf",
"jobTitle": "CEO",
"image": "janedoe.jpg",
"description": "jane doe description"
}
Until this moment, it is perfectly fine.
But if I add a new field like “memberOf”, then the ordering of the fields gets changed.
{
"name": "Jane Doe",
"url": "http://www.janedoe.com",
"@context": "https://schema.org",
"memberOf": "janedoewebsite.com",
"sameAs": "sdfsdfsdf",
"@type": "Person",
"jobTitle": "CEO",
"image": "janedoe.jpg",
"description": "jane doe description"
}
The whole ordering of fields has been changed by introducing field 9.
System
- Node.js version: 14.15.3
- NPM version: 6.14.9
- Strapi version: 3.6.3
- Database: SQLite locally, postgreSQL on Production
- Operating system: macOS Big Sur
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solveIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: core:content-managerSource is core/content-manager packageSource is core/content-manager packagestatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members