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

Front page is broken for upgrade due to completionpassgrade available only after upgrade

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72851-master
    • Hide

      Note: You need a 3.11 site installation.

      1. Login as admin in your 3.11 site and go to front page.
      2. Switch branch to 4.0. (Make sure the 4.0 has the patch applied).
      3. Visit any of index.php, login/index.php, my/index.php, admin/search.php.
      4. Ensure you are logged out and prompted to upgrade and no errors are presented.
      5. Follow the instructions and upgrade the site.
      6. Login as admin and go to front page.
      7. Ensure no errors is presented.
      Show
      Note:  You need a 3.11 site installation. Login as admin in your 3.11 site and go to front page. Switch branch to 4.0. (Make sure the 4.0 has the patch applied). Visit any of index.php, login/index.php, my/index.php, admin/search.php. Ensure you are logged out and prompted to upgrade and no errors are presented. Follow the instructions and upgrade the site. Login as admin and go to front page. Ensure no errors is presented.

    Description

      It is possible to get error for front page if site is upgraded to 4.0. Unfortunately I don't have exact steps to reproduce - it depends on data - activities setup I assume. But when you logged in as admin, switch to 4.0 branch from 3.11 and reload front page you might end up with

      Notice: Undefined property: stdClass::$completionpassgrade in /Users/stronk7/git_moodle/integration/course/lib.php on line 464
      

      After running upgrade (view going to admin/index.php or cli) the error goes away. So it seems that the front page is trying to access to stuff that still not exists. Best course of action seems to update is_major_upgrade_required since 52206 introduced big db changes for modules

      Attachments

        Issue Links

          Activity

            People

              ilyatregubov Ilya Tregubov
              ilyatregubov Ilya Tregubov
              Carlos Escobedo Carlos Escobedo
              Andrew Lyons Andrew Lyons
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 38 minutes
                  38m