-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
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
[BUG] Getting "error-invalid-customfield-json" on signup with Custom Fields #8448
Comments
Looks like the error happens because there's an invalid character. I did fix this issue in our docs (RocketChat/docs-old#410) but I don't know exactly how to fix in the Admin docs, since that JSON is being used as a translated string (?). |
I get this issue also on my default rocketchat instance in browser. Not just for IOS APP. |
@maxpen Looks like the JSON is invalid when this error happens. Make sure you use some JSON linter to validate it and remove any invalid character: http://jsonlint.com. After that, everything should work just fine. |
@rafaelks Can you copy me a working example? I'm not so good with json and that tool just tells me SyntaxError: Bad string on line 1 and I have no idea what is wrong with line 1 :) |
@maxpen The script on this pr file should be working https://github.com/RocketChat/Rocket.Chat.Docs/pull/410/files |
@MartinSchoeler that works! When do we see this pr in the new release? Also how do I display these custom values for other users or get them to show up in the admin panel for each user? This issue has not fixed it: #7688 |
I'm unable to get any customfields to show up in the UserInfo tab as well. I can see it when i go into My Account just not when I look at a users profile. |
The problem is really annoying, it would be great if you could change the behavior like described from |
Tried again this today... took me many tries until I got it right. There's no kind of JSON validation on the field and copying it from the documentation doesn't work because of hidden characters. In case anyone wants to try the documentation JSON, here's one working: {
"role": {
"type": "select",
"defaultValue": "student",
"options": ["teacher", "student"],
"required": true,
"modifyRecordField": {
"array": true,
"field": "roles"
}
},
"twitter": {
"type": "text",
"required": true,
"minLength": 2,
"maxLength": 10
}
} |
yeah, the documentation below it is useless to copy, it uses tabs which doesnt work |
I experienced the same issue, I guess we should let RocketChat sanetize the JSON , by removing tabs |
I don't believe this issue should have been closed? Certainly it's still present in v3.14.0 For clarification; tabs in the custom fields JSON will silently fail until a user tries to register. |
Description:
We're working to add support to Custom Fields into the native iOS app and in my tests, I can't have Custom Fields and create a new user from the web.
Server Setup Information:
Steps to Reproduce:
Expected behavior:
Actual behavior:
The text was updated successfully, but these errors were encountered: