Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61723

Courses with long "shortname" can't backup anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 3.3.5, 3.4.2
    • Backup

      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 :

      1. connect has a teacher
      2. go to course 101
      3. click on the action menu and select "backup"
      4. click on "next" button (NOT "jump to final step")
      5. click again on next button (you should now be on the "Confirmation and review" part with no problem)
      6. come back to the course page and edit course setting
      7. modify course shortname with something quite long ("101 This is a completely empty course for testing purposes." for exemple) and save
      8. click on the action menu and select "backup"
      9. click on "next" button (NOT "jump to final step")
      10. click again on next button
      11. 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.

            Votes:
            36 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved:

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