BUG: Benutzerdefinierte Kategorie/Neue Objekte SQL error
-
Hallo,
in idoit 0.9.9-8 gibt es ein Problem mit custom Kategorien/Feldern.
Wenn man ein neues Objekt angelegt wird und man dafür entsprechend ein custom Feld setzen möchte bekommt man einen SQL Fehler:
Database error : Query error: 'INSERT INTO isys_catg_custom_fields_list SET isys_catg_custom_fields_list__isys_obj__id = '1396', isys_catg_custom_fields_list__isysgui_catg_custom__id = '1', isys_catg_custom_fields_list__field_key = '', isys_catg_custom_fields_list__field_content = '', isys_catg_custom_fields_list__field_type = '', isys_catg_custom_fields_list__status = ''2'', isys_catg_custom_fields_list__description = '' ;':
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2'', isys_catg_custom_fields_list__description = ''' at line 1Bereits existierende Objekte wo das Feld bereits gesetzt ist sind nicht betroffen.
Folgender Patch hilft:
diff --git a/src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_custom_fields.class.php b/src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_custom_fields.class.php index dfd7af9..4ac0150 100644 --- a/src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_custom_fields.class.php +++ b/src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_custom_fields.class.php @@ -51,7 +51,7 @@ class isys_cmdb_dao_category_g_custom_fields extends isys_cmdb_dao_category_glob "isys_catg_custom_fields_list__field_key = " . $this->convert_sql_text($p_key) . ", " . "isys_catg_custom_fields_list__field_content = " . $this->convert_sql_text($p_value) . ", " . "isys_catg_custom_fields_list__field_type = " . $this->convert_sql_text($p_type) . ", " . - "isys_catg_custom_fields_list__status = '" . $this->convert_sql_int($p_status) . "', " . + "isys_catg_custom_fields_list__status = " . $this->convert_sql_int($p_status) . ", " . "isys_catg_custom_fields_list__description = " . $this->convert_sql_text($p_description) . " " . ";";convert_sql_int() fügt bereits ' hinzu.
-
Hi,
das ist uns bekannt und wird bis zum nächsten Release gefixt sein.
Lieben Gruß
Christian
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login