Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    BUG: Benutzerdefinierte Kategorie/Neue Objekte SQL error

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 1.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      freddy
      last edited by

      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 1

      Bereits 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.

      1 Reply Last reply Reply Quote 0
      • creissC Offline
        creiss i-doit Kenner
        last edited by

        Hi,

        das ist uns bekannt und wird bis zum nächsten Release gefixt sein.

        Lieben Gruß
        Christian

        NEU - i-doit und IT-Dokumentation bei YouTube: https://www.youtube.com/@donamic_de
        Komplett-Strategie: https://i-doit-trainings.de/it-dokumentation-komplett-strategie/
        i-doit Mastery – https://i-doit-trainings.de/i-doit-mastery

        1 Reply Last reply Reply Quote 0
        • First post
          Last post