Skip to content
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 in settings form: jsoneditor mode is stored as integer instead of text #406

Open
Detsieber opened this issue Nov 30, 2023 · 1 comment

Comments

@Detsieber
Copy link
Member

Never use the settings form for storing a value for jsoneditor mode: This will not store the value (e.g. "text") but the integer value which entry was selected (e.g. "1"). Then, on the configuration forms, the jsoneditor isn't displayed anymore.

Workaround:

Look at the wrong value in the database:

MariaDB [pro_civicrm]> select * from civicrm_setting where name like "%json%";
+-----+------------------+-------+-----------+------------+-----------+--------------+---------------------+------------+
| id | name | value | domain_id | contact_id | is_domain | component_id | created_date | created_id |
+-----+------------------+-------+-----------+------------+-----------+--------------+---------------------+------------+
| 415 | json_editor_mode | i:1; | 1 | NULL | 1 | NULL | 2023-11-30 18:17:28 | 3 |
+-----+------------------+-------+-----------+------------+-----------+--------------+---------------------+------------+
1 row in set (0,001 sec)

Update the value:

MariaDB [pro_civicrm]> update civicrm_setting set value = 's:4:"code";' where name = "json_editor_mode";
Query OK, 1 row affected (0,001 sec)
Rows matched: 1 Changed: 1 Warnings: 0

The fix is easy however, we will come up with a commit tonight.

@Detsieber Detsieber changed the title Bug in cettings form: jsoneditor mode is stored as integer instead of text Bug in settings form: jsoneditor mode is stored as integer instead of text Nov 30, 2023
@Detsieber
Copy link
Member Author

fix is here: #407
Thank you, Sebastian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant