Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6061

Domoscio: Allows creation of the instance with invalid empty data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 3.0
    • Module: Domoscio
    • None
    • MOODLE_30_STABLE

      It is possible to create domoscio instance with invalid empty/null data (e.g. when creating in an empty course or when there is a problem with API call), leading to a fatal SQL exception

      Debug info: ERROR: null value in column "kgraphid" violates not-null constraint
      DETAIL: Failing row contains (1, null, 5).
      INSERT INTO mdl_domoscio_knowledge_graphs (courseid,kgraphid) VALUES($1,$2) RETURNING id
      [array (
      'courseid' => '5',
      'kgraphid' => NULL,
      )]
      Error code: dmlwriteexception
      Stack trace:
       
          line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
          line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
          line 868 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
          line 924 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
          line 98 of /mod/domoscio/lib.php: call to pgsql_native_moodle_database->insert_record()
          line 121 of /course/modlib.php: call to domoscio_add_instance()
          line 275 of /course/modedit.php: call to add_moduleinfo()
      

      It should better validate / deal with the error like this.

            domoscio Benoit Praly
            mudrd8mz David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.