Moodle
  1. Moodle
  2. MDL-35344

Error fetching available updates info after an upgrade

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 2.4
    • Fix Version/s: 2.3.3
    • Component/s: Administration
    • Labels:

      Description

      Steps to reproduce:

      1. Install Moodle 2.3
      2. Check for available updates via executing cron or manually via admin UI
      3. Upgrade the site to 2.4dev
      4. Execute cron.php

      Expected result: Recently fetched data were valid for 2.3. Thence they are discarded and fresh data for 2.4 branch are fetched

      What currently happens: Coding error exception is thrown

      Outdated or missing info about available updates, forced fetching ... Default exception handler: Coding error detected, it must be fixed by a programmer: PHP catchable fatal error Debug: Argument 1 passed to available_update_checker::compare_responses() must be an array, null given, called in /home/mudrd8mz/public_html/moodle23tmp/lib/pluginlib.php on line 1152 and defined
      Error code: codingerror

      • line 397 of /lib/setuplib.php: coding_exception thrown
      • line 901 of /lib/pluginlib.php: call to default_error_handler()
      • line 1152 of /lib/pluginlib.php: call to available_update_checker->compare_responses()
      • line 775 of /lib/pluginlib.php: call to available_update_checker->cron_execute()
      • line 394 of /lib/cronlib.php: call to available_update_checker->cron()
      • line 61 of /admin/cli/cron.php: call to cron_run()

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            David Mudrak added a comment -

            Linking the issue where Michael de Raadt reported it initially.

            Show
            David Mudrak added a comment - Linking the issue where Michael de Raadt reported it initially.
            Hide
            David Mudrak added a comment -

            Submitting a patch for integration. See the commit message for explanation.

            DEAR INTEGRATORS: This fix is necessary for master. There should be no need to backport this into 2.3 as the only known case of invalid format is the one described in the steps to reproduce (that is cron running in 2.4 with data fetched in 2.3). On the other hand, backporting should be pretty safe and could help 2.3 sites to handle similar problems in the future. I'll leave final decision on you. My uncertain +0.8 would go for cherry-picking this into MOODLE_23_STABLE.

            Show
            David Mudrak added a comment - Submitting a patch for integration. See the commit message for explanation. DEAR INTEGRATORS: This fix is necessary for master. There should be no need to backport this into 2.3 as the only known case of invalid format is the one described in the steps to reproduce (that is cron running in 2.4 with data fetched in 2.3). On the other hand, backporting should be pretty safe and could help 2.3 sites to handle similar problems in the future. I'll leave final decision on you. My uncertain +0.8 would go for cherry-picking this into MOODLE_23_STABLE.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated (23 and master). I think it's a good prevention against other, future, potential buggy responses, so finally decided to backport it to 23_STABLE.

            Note to testers: it's enough to perform the description steps and verify the error doesn't happen anymore in master. Testing under 23_STABLE would require hacking and it's not worth the effort.

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated (23 and master). I think it's a good prevention against other, future, potential buggy responses, so finally decided to backport it to 23_STABLE. Note to testers: it's enough to perform the description steps and verify the error doesn't happen anymore in master. Testing under 23_STABLE would require hacking and it's not worth the effort.
            Hide
            Tim Barker added a comment -

            As this affects upgrades does it need testing over all 4 databases?

            Show
            Tim Barker added a comment - As this affects upgrades does it need testing over all 4 databases?
            Hide
            David Mudrak added a comment -

            Tim, I don't think so. The change is not DB specific.

            Show
            David Mudrak added a comment - Tim, I don't think so. The change is not DB specific.
            Hide
            Jason Fowler added a comment -

            All good here David, thanks for the fix

            Show
            Jason Fowler added a comment - All good here David, thanks for the fix
            Hide
            Dan Poltawski added a comment -

            Congratulations, you've done it!

            Thanks, this change is now in the latest weekly release!

            Join the crowds of people tomorrow from 8am and download this Moodle release from your local apple store!

            Show
            Dan Poltawski added a comment - Congratulations, you've done it! Thanks, this change is now in the latest weekly release! Join the crowds of people tomorrow from 8am and download this Moodle release from your local apple store!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: