Modifying user permission failed when an optional custom field is empty
See original GitHub issueEnvironment:
- CTFd Version/Commit: 3.1.0-release
- Operating System: ubuntu18.04
- Web Browser and Version: chrome 85.0
What happened?
I set an optional custom field for my CTFd, I found when it’s empty, I can’t modify user permission. The submit button have no response. Here are the error log in console:
vendor.bundle.min.js?d=b4adfef4:150 Uncaught Error: Syntax error, unrecognized expression: :input[name=fields[3]]
at Function.se.error (vendor.bundle.min.js?d=b4adfef4:150)
at se.tokenize (vendor.bundle.min.js?d=b4adfef4:150)
at se.select (vendor.bundle.min.js?d=b4adfef4:150)
at Function.se [as find] (vendor.bundle.min.js?d=b4adfef4:150)
at k.fn.init.find (vendor.bundle.min.js?d=b4adfef4:150)
at eval (utils.js:43)
at Array.map (<anonymous>)
at k.fn.init._jquery.default.fn.serializeJSON (utils.js:38)
at HTMLFormElement._ (user.min.js?d=b4adfef4:1)
at HTMLFormElement.dispatch (vendor.bundle.min.js?d=b4adfef4:150)
se.error @ vendor.bundle.min.js?d=b4adfef4:150
se.tokenize @ vendor.bundle.min.js?d=b4adfef4:150
se.select @ vendor.bundle.min.js?d=b4adfef4:150
se @ vendor.bundle.min.js?d=b4adfef4:150
find @ vendor.bundle.min.js?d=b4adfef4:150
eval @ utils.js:43
_jquery.default.fn.serializeJSON @ utils.js:38
_ @ user.min.js?d=b4adfef4:1
dispatch @ vendor.bundle.min.js?d=b4adfef4:150
g.handle @ vendor.bundle.min.js?d=b4adfef4:150
When I set some value to that empty field, everything is all right. But it should be optional.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Error "One of the Required Fields Is Empty" When a User ...
Solution · Log in to the admin control panel. · From the Home tab, select Custom Fields and click Fields. · Click to...
Read more >User Save fail if Optional Custom Select Field is left empty
Description: Leave optional (Required false) type select custom Fields empty and Save Users Profile not working.
Read more >Empty Custom Field Display on View Issue Screen
We are trying to figure out a way to have it appear on the screen all of the time, even when it is...
Read more >Manage Custom Fields | YouTrack Server Documentation
When a field is public, any user who has the Read Issue or Update Issue permissions in your project can view or edit...
Read more >Adding custom fields to your tickets and support request form
Custom ticket fields can be required or optional. ... Customers can edit: Agents and end users can view and edit the field.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like an updated version of @babel/core fixes this.
You can run the following to fix this in the meantime.
@AXDOOMER do the above commands fix it for you? I can merge in #1654 in but I’m not sure if it will break something else.