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

Adhoc tasks for backup/restore fail if tool_recyclebin task runs at the same time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3.8, 4.4.4
    • 4.3.8, 4.4, 4.5
    • Backup
    • MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-82959-MOODLE_403_STABLE
    • MDL-82959-MOODLE_404_STABLE
    • MDL-82959-main
    • Hide
      • Login as an admin
      • Go to the site administration
      • Search for "enableasyncbackup"
      • Confirm that "enableasyncbackup" is enabled
      • Ensure that cron service is not running on your machine
      • Create a course
      • Add a new "Text and media area" from the Resources
      • Add another "Text and media area" from the Resources
      • Delete the first "Text and media area"
      • Go to "More", "Course reuse" and click "Backup"
      • Click "Jump to final step"
      • Run the cron: "php admin/cli/cron.php"
      • Verify that the task logs (Site administration > Server > Tasks > Task logs) show the course_modules_deletion task without errors followed by the asynchronous_backup_task
      • Verify that the task log output does not have an error including "array_key_exists"
      Show
      Login as an admin Go to the site administration Search for "enableasyncbackup" Confirm that "enableasyncbackup" is enabled Ensure that cron service is not running on your machine Create a course Add a new "Text and media area" from the Resources Add another "Text and media area" from the Resources Delete the first "Text and media area" Go to "More", "Course reuse" and click "Backup" Click "Jump to final step" Run the cron: "php admin/cli/cron.php" Verify that the task logs (Site administration > Server > Tasks > Task logs) show the course_modules_deletion task without errors followed by the asynchronous_backup_task Verify that the task log output does not have an error including "array_key_exists"

      Steps to reproduce:

      • Set config enableasyncbackup = 1
      • Create a course with two activities (mod_label is enough)
      • Delete one of them
      • Start a course backup of the course
      • Start cron (it is important that cron handles both tasks in the same run)
      • Backup will fail with "TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given"

       

            stefan.hanauska Stefan Hanauska
            stefan.hanauska Stefan Hanauska
            PhMemmel PhMemmel
            Safat Shahin Safat Shahin
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 9 minutes
                2h 9m

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