Recently i updated Osticket from version 1.9 to 1.11. When I tried to add a new option value on a custom field from one of my forms, loading gif keeps showing and behind it the following error is showing in the options list values: "Each choice requires a key and has to be on a new line". In version 1.9 this error didn't happen.
Forms Custom Fields Options error adding values to list
Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance. The more information you give us the better we will be able to assist you. Thank you.
Environment details?
PHP error logs?
Ok, I'll proceed sending the errors that I've detected from this issue:
PHP version: 5.6
About Osticket -> Log entry -> none
Console Jquery error when Save is clicked:
jquery-3.4.0.min.js?a076918:2 Uncaught Error: Syntax error, unrecognized expression: a[href=#config]
at Function.se.error (jquery-3.4.0.min.js?a076918:2)
at se.tokenize (jquery-3.4.0.min.js?a076918:2)
at se.select (jquery-3.4.0.min.js?a076918:2)
at Function.se [as find] (jquery-3.4.0.min.js?a076918:2)
at k.fn.init.find (jquery-3.4.0.min.js?a076918:2)
at new k.fn.init (jquery-3.4.0.min.js?a076918:2)
at k (jquery-3.4.0.min.js?a076918:2)
at HTMLDivElement.<anonymous> (scp.js?a076918:744)
at Function.each (jquery-3.4.0.min.js?a076918:2)
at k.fn.init.each (jquery-3.4.0.min.js?a076918:2)
From PHP logs -> none
It seems you skipped a few things:
No webserver or version mentioned.
No PHP error logs posted.
Ok, I'll proceed sending the things that are missing:
PHP version: 5.6
Webserver: Xampp with Apache 2.4 and PHP 5.6.
As I said in a previous post, there are no error in php logs for this operation.
I would say that your problem is likely 1.11 or XAMPP. 1.11 is buggy and not secure and not supported. You should upgrade to 1.12. After you have done that we will see if it fixes your problem or if we need to troubleshoot this further. Does your XAMPP have mod_security installed?
- Edited
lhvergara This happens on my instance of 1.12 too, but I think the issue is it's expecting a key to go with the value (I'm guessing 1.9 didn't have this feature?). The idea being that if you type each choice in as key:value, then Value is what's displayed to the user and on the forms, but key is stored in the database. This way if you update value, key remains the same and old form entries aren't broken.
So basically you need to change the options to key:value entries, i.e.
a:a
b:b
c:c
RBGE Thanks you! These solved my problem!