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

Can't restore all content from large backups

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.9, 2.2.6, 2.3.3, 2.4
    • None
    • Backup
    • None
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Hide

      Increase max_input_vars in php.ini

      Show
      Increase max_input_vars in php.ini

    Description

      With the default max_input_vars setting of 1000, large backups (i.e. those containing lots of activities and/or resources) can't be restored in their entirety. Although the full array of checkboxes are displayed on the "schema" page, the "review" page will only show them ticked up to a certain point, at which everything else is shown with a cross. This is because max_input_vars has been hit - and is probably easiest to replicate by lowering your max_input_vars setting and using a backup of the features demo course - unless you happen to have a backup handy that has vast numbers of activities and/or resources (the features demo course does not contain enough to encounter this at the default of max_input_vars=1000).

      The solution is to refactor the form so that it uses arrays of fields, as max_input_vars applies to each level in an array (i.e. you can have at most max_input_vars top-level fields, but each of those can be an array containing up to max_input_vars elements, each of which can also be an array up to max_input_nesting_level (default 64) levels deep). See MDL-35074 for an example of doing this in the gradebook, though it may need to be dealt with slightly differently if the restore process does not use data_submitted() to retrieve all fields in one go.

      Attachments

        Issue Links

          Activity

            People

              moodle.com Moodle HQ
              paul.n Paul Nicholls
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: