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

Backup/Restore fails in Moodle 2.2 if repository fileareas with certain names are included

XMLWordPrintable

    • MOODLE_22_STABLE
    • Hide

      There does not appear to be any workaround for plugins that experience this problem, other than a custom migration/install script. There appears to be no generalized repository browser available to the admin for fixing issues of this type. For restore, it is not clear from the API how files should be restored to a different filearea than the one they were backed up from.

      Show
      There does not appear to be any workaround for plugins that experience this problem, other than a custom migration/install script. There appears to be no generalized repository browser available to the admin for fixing issues of this type. For restore, it is not clear from the API how files should be restored to a different filearea than the one they were backed up from.
    • Hide

      Create a repository filearea under Moodle 2.1.x with a name containing a dash, such as "test-area", or any name with complies with PARAM_ALPHAEXT but not with PARAM_AREA. Create a backup containing this filearea, then attempt to restore the backup under Moodle 2.2. Instead of a successful restore, an exception occurs in the browser, because the filearea name is invalid.

      Show
      Create a repository filearea under Moodle 2.1.x with a name containing a dash, such as "test-area", or any name with complies with PARAM_ALPHAEXT but not with PARAM_AREA. Create a backup containing this filearea, then attempt to restore the backup under Moodle 2.2. Instead of a successful restore, an exception occurs in the browser, because the filearea name is invalid.

      Prior to Moodle 2.2, repository filearea names were cleaned with PARAM_ALPHAEXT. In Moodle 2.2, they are cleaned with PARAM_AREA. For example, reference function create_file_from_string in $CFG->libdir/filestorage/file_storage.php. This prevents backing up compliant fileareas under previous Moodle versions and restoring them under Moodle 2.2. Attempting to do so generates an exception in the browser during the restore process. Plugins whose fileareas are no longer compliant must not only migrate their files to a new filearea, they are faced with the problem of broken restores as well.

            Unassigned Unassigned
            respondus Respondus, Inc. (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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