-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.3.5
-
None
-
3.3.2
-
MOODLE_33_STABLE
How to replicate the error:
- Create a dataform database including a view and a filter with a sorting (ascending/descending)
- Backup the dataform
- Restore it.
- On the view with the filter above, you will get a error message (see below).
- To cure the dataform, edit the filter again.
A similar error appeared when I upgraded from Moodle 2.8.3 to 3.3.5
– error message —
Debug info: Unknown column 'c26.0' in 'order clause'
SELECT e.id, e.dataid, e.state, e.timecreated, e.timemodified, e.userid, e.groupid, e.type , u.id AS uid ,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email,u.idnumber,u.username FROM mdl_dataform_entries e JOIN mdl_user u ON u.id = e.userid LEFT JOIN mdl_dataform_contents c26 ON c26.fieldid = 26 AND c26.entryid = e.id WHERE e.dataid = ? ORDER BY c26.0 ASC
[array (
0 => '5',
)]
Error code: dmlreadexception
Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1216 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 69 of /mod/dataform/view/interval/classes/interval.php: call to mod_dataform\pluginbase\dataformview->display()
line 466 of /mod/dataform/classes/dataform.php: call to dataformview_interval_interval->display()
line 71 of /mod/dataform/view.php: call to mod_dataform_dataform->display()