-
Bug
-
Resolution: Done
-
Major
-
None
-
3.3.5, 3.4.2
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-61723-master
This is a regression introduced in 3.3.5 and 3.4.2 (and i suspect 3.5 also), because everything was working well in 3.3.4.
I've discovered that all courses having a "long" shortname can't be backuped anymore, by manuel backup, automatic backup, or via importation.
I've opened a related discussion in english and another one in french.
You can test this on qa.moodle.net :
- connect has a teacher
- go to course 101
- click on the action menu and select "backup"
- click on "next" button (NOT "jump to final step")
- click again on next button (you should now be on the "Confirmation and review" part with no problem)
- come back to the course page and edit course setting
- modify course shortname with something quite long ("101 This is a completely empty course for testing purposes." for exemple) and save
- click on the action menu and select "backup"
- click on "next" button (NOT "jump to final step")
- click again on next button
- you should now be on the "Confirmation and review" part with no problem, but you'll have the error message :
error/setting_invalid_filename
More information about this error
Debug info:
Error code: setting_invalid_filename
$a contents: backup-moodle2-course-7-101_this_is_a_completely_empty_course_for_testing_purposes.-20180322-1813-nu.mbz
Stack trace:
- line 462 of /backup/util/settings/base_setting.class.php: base_setting_exception thrown
- line 166 of /backup/util/settings/base_setting.class.php: call to base_setting->validate_value()
- line 456 of /backup/util/ui/backup_ui_stage.class.php: call to base_setting->set_value()
- line 137 of /backup/util/ui/base_ui_stage.class.php: call to backup_ui_stage_confirmation->initialise_stage_form()
- line 180 of /backup/util/ui/base_ui.class.php: call to base_ui_stage->display()
- line 165 of /backup/backup.php: call to base_ui->display()
Searching for setting_invalid_filename in /backup/util/settings/base_setting.class.php i've ended to find it in function clean_param defined in lib/moodlelib.php
It seems that, at a point between 3.3.4 and 3.3.5, new things have been added, with a limit on filename to 90 chars. I think it's the base of the problem. But i don't know exactly which tracker item is responsible of this and introduced this regression.