Open iv-enovation opened 2 years ago
Thank you for your feedback. This issue has been fixed, you'll find the fix on the new repository page on gitlab : https://gitlab.com/dne-elearning/moodle-magistere/moodle-mod_labellud/-/commit/1d60db8c29b054b95cf4e54a955aca9563978d52
Hi,
when trying to drag and drop a media file (png or mp3 or mp4) i receive a modal window with 3 options when selecting the 2nd option, the madia file does not add to the course displaying the "Error writing to DB" message - please see attached
the errors in the logs are:
[Wed Jun 01 09:56:36.679655 2022] [php7:notice] [pid 32058] [client 10.0.0.46:41540] PHP Notice: Undefined property: stdClass::$type in /var/www/html/ticket/moodle_391/mod/labellud/lib.php on line 68, referer: https://work:1337/ticket/moodle_391/course/view.php?id=7 [Wed Jun 01 09:56:36.679740 2022] [php7:notice] [pid 32058] [client 10.0.0.46:41540] PHP Notice: Trying to get property 'name' of non-object in /var/www/html/ticket/moodle_391/mod/labellud/lib.php on line 68, referer: https://work:1337/ticket/moodle_391/course/view.php?id=7 [Wed Jun 01 09:56:36.681391 2022] [php7:notice] [pid 32058] [client 10.0.0.46:41540] Default exception handler: Error writing to database Debug: ERROR: null value in column "name" of relation "mdl_labellud" violates not-null constraint\nDETAIL: Failing row contains (7, 7, null, sd.mp4, 1, 0, 0, 1654077396).\nINSERT INTO mdl_labellud (course,name,intro,introformat,timemodified) VALUES($1,$2,$3,$4,$5) RETURNING id\n[array (\n 'course' => '7',\n 'name' => NULL,\n 'intro' => 'sd.mp4',\n 'introformat' => '1',\n 'timemodified' => 1654077396,\n)]\nError code: dmlwriteexception\n line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown\n line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()\n line 1025 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()\n line 1073 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()\n line 72 of /mod/labellud/lib.php: call to pgsql_native_moodle_database->insert_record()\n line 320 of /mod/labellud/lib.php: call to labellud_add_instance()\n line 8026 of /lib/moodlelib.php: call to labellud_dndupload_handle()\n line 8008 of /lib/moodlelib.php: call to component_callback()\n line 508 of /course/dnduploadlib.php: call to plugin_callback()\n line 476 of /course/dnduploadlib.php: call to dndupload_ajax_processor->handle_file_upload()\n* line 41 of /course/dndupload.php: call to dndupload_ajax_processor->process()\n, referer: https://work:1337/ticket/moodle_391/course/view.php?id=7
another issue, is that in the modal window, 2 first options have the same name