We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fields with the "text" type can sometimes return numbers in JSON, including leading zeroes being trimmed from the output.
This causes problems with:
numbers
strings
This seems to be the same bug as #283, but that has since been closed without a resolution that I can see.
Here's the schema of a test collection with a single field of type text:
test
text
{ "name": "test", "label": "", "_id": "test5bd86bcc4a0a7", "fields": [ { "name": "textField", "label": "", "type": "text", "default": "", "info": "", "group": "", "localize": false, "options": [], "width": "1-1", "lst": true, "acl": [], "required": false } ], "sortable": false, "in_menu": false, "_created": 1540910028, "_modified": 1540910122, "color": "", "acl": [], "rules": { "create": { "enabled": false }, "read": { "enabled": false }, "update": { "enabled": false }, "delete": { "enabled": false } }, "itemsCount": 4 }
I've added some test data to the collection:
""
01234
1234
"01234"
"\"01234\""
I'd expect example 2 to output the JSON string "01234".
{ "fields": { "textField": { "name": "textField", "type": "text", "localize": false, "options": [] } }, "entries": [ { "textField": "", "_mby": "5bd86b95633434001000004c", "_by": "5bd86b95633434001000004c", "_modified": 1540910129, "_created": 1540910129, "_id": "5bd86c3163343400110003ce" }, { "textField": "\"01234\"", "_mby": "5bd86b95633434001000004c", "_by": "5bd86b95633434001000004c", "_modified": 1540910171, "_created": 1540910171, "_id": "5bd86c5b63343400160000fc" }, { "textField": 1234, "_mby": "5bd86b95633434001000004c", "_by": "5bd86b95633434001000004c", "_modified": 1540910758, "_created": 1540910758, "_id": "5bd86ea6633434001d00036d" } ], "total": 3 }
The text was updated successfully, but these errors were encountered:
Do you use MongoDB or SQLite? Seems to be the same as #907 (created 5min before your issue)
Sorry, something went wrong.
I'm using SQLite.
fixed here: 4a90575
Can be closed.
No branches or pull requests
Description of problem
Fields with the "text" type can sometimes return numbers in JSON, including leading zeroes being trimmed from the output.
This causes problems with:
numbers
and somestrings
.This seems to be the same bug as #283, but that has since been closed without a resolution that I can see.
Test schema
Here's the schema of a
test
collection with a single field of typetext
:Examples
I've added some test data to the collection:
""
(empty JSON string)01234
outputs1234
(JSON number, leading zero missing)"01234"
(with quotes) outputs"\"01234\""
(JSON string, with escaped quotes)I'd expect example 2 to output the JSON string
"01234"
.The text was updated successfully, but these errors were encountered: