Skip to content

Bug in settings form: jsoneditor mode is stored as integer instead of text #406

@Detsieber

Description

@Detsieber

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions