Dataform errors with file storage on Moodle 3.11

Dataform errors with file storage on Moodle 3.11

by Sidd Lep -
Number of replies: 1

Hello!

It seems that dataform doesn't work so well in Moodle 3.11. In a case file or picture field is used, error/moodle/dmlreadexception appears, telling that it is not possible to read from SQL database.

Debug info: Unknown column 'g.hidepicture' in 'field list'

SELECT e.id, e.dataid, e.state, e.timecreated, e.timemodified, e.userid, e.groupid, e.type , g.idnumber AS groupidnumber,g.name AS groupname,g.hidepicture AS grouphidepic,g.picture AS grouppic FROM mdlrn_dataform_entries e LEFT JOIN mdlrn_groups g ON g.id = e.groupid WHERE e.dataid = ? ORDER BY e.id ASC
[array (
0 => '57',
)]
Error code: dmlreadexception


Stack trace:

  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 234 of /mod/dataform/classes/entry_manager.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 142 of /mod/dataform/classes/entry_manager.php: call to mod_dataform_entry_manager->fetch_entries()
  • line 332 of /mod/dataform/classes/pluginbase/dataformview.php: call to mod_dataform_entry_manager->set_content()
  • line 315 of /mod/dataform/classes/pluginbase/dataformview.php: call to mod_dataform\pluginbase\dataformview->set_entries_content()
  • line 466 of /mod/dataform/classes/dataform.php: call to mod_dataform\pluginbase\dataformview->display()
  • line 71 of /mod/dataform/view.php: call to mod_dataform_dataform->display()

Does anyone of you faced with the same problem and is there any solution for this?

Thank you.

Average of ratings: -
In reply to Sidd Lep

Re: Dataform errors with file storage on Moodle 3.11

by Andrei S -
I had the same problem with the Datalynx plugin. I've added the hidepicture field in the mdl_groups table.
ALTER TABLE `mdl_groups` ADD `hidepicture` INT(1) NOT NULL DEFAULT '0' AFTER `timemodified`;
It seems to work.