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

factor_sms-related debugging call during upgrade

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • MDL-85116-405
    • MDL-85116-main
    • Hide
      Setup
      1. Check out the v4.5.0 tag of your Moodle instance:

        git checkout v4.5.0
        

      2. Do a fresh install
      3. Enable debugging mode by setting these two config: debug to Developer, debugdisplay to Yes.
        Or if using MDK, "mdk run mindev"
      factor_sms not set
      1. Do the above setup steps
      2. Check out the latest version of the branch you're testing (e.g. on 405, git checkout MOODLE_405_STABLE)
      3. Go through the upgrade process.
      4. On the "Upgrading to new version" page, search for factor_sms
      5. Confirm that no debugging message about the undefined properties' weight and duration is shown.
      6. Finish the rest of the upgrade
      7. Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms)
      8. Check the Factor weight and Secret validity duration
      9. Confirm that they are set to their default, non-zero values.
      factor_sms has been set and misconfigured
      1. Do the above setup steps
      2. Go to Admin > Plugins > SMS > SMS gateways
      3. Create an SMS gateway, set a name and fill out the keys with arbitrary values.
      4. Make sure the SMS gateway is enabled
      5. Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms)
      6. Select the SMS gateway that you created.
      7. Leave both the Factor weight and Secret validity duration blank.
      8. Save the changes
      9. Check out the latest version of the branch you're testing (e.g. on 405, git checkout MOODLE_405_STABLE)
      10. Go through the upgrade process.
      11. On the "Upgrading to new version" page, search for factor_sms
      12. Confirm that no debugging message about the undefined properties' weight and duration is shown.
      13. Finish the rest of the upgrade
      14. Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms)
      15. Check the Factor weight and Secret validity duration
      16. Confirm that they are set to their default, non-zero values.
      Show
      Setup Check out the v4.5.0 tag of your Moodle instance: git checkout v4.5.0 Do a fresh install Enable debugging mode by setting these two config: debug to Developer , debugdisplay to Yes . Or if using MDK, " mdk run mindev " factor_sms not set Do the above setup steps Check out the latest version of the branch you're testing (e.g. on 405, git checkout MOODLE_405_STABLE ) Go through the upgrade process. On the " Upgrading to new version " page, search for factor_sms Confirm that no debugging message about the undefined properties' weight and duration is shown. Finish the rest of the upgrade Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms) Check the Factor weight and Secret validity duration Confirm that they are set to their default, non-zero values. factor_sms has been set and misconfigured Do the above setup steps Go to Admin > Plugins > SMS > SMS gateways Create an SMS gateway, set a name and fill out the keys with arbitrary values. Make sure the SMS gateway is enabled Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms) Select the SMS gateway that you created. Leave both the Factor weight and Secret validity duration blank. Save the changes Check out the latest version of the branch you're testing (e.g. on 405, git checkout MOODLE_405_STABLE ) Go through the upgrade process. On the " Upgrading to new version " page, search for factor_sms Confirm that no debugging message about the undefined properties' weight and duration is shown. Finish the rest of the upgrade Go to Admin > Plugins > Admin tools > Multi-factor authentication > SMS (/admin/settings.php?section=factor_sms) Check the Factor weight and Secret validity duration Confirm that they are set to their default, non-zero values.
    • Hide

      Code verified against automated checks.

      Checked MDL-85116 using repository: https://github.com/junpataleta/moodle.git

      More information about this report

      Built on: Mon Apr 7 03:07:23 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-85116 using repository: https://github.com/junpataleta/moodle.git MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-85116-405 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-85116-main | CI Job ] More information about this report Built on: Mon Apr 7 03:07:23 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-85116 -405 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18940/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64814/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64815/ Behat (Firefox - boost) Launching automatic jobs for branch MDL-85116 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18941/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64816/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64817/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64818/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64819/ App tests (stable app version) Built on: Mon Apr 7 06:25:36 UTC 2025

      To reproduce:

      1. Check out the v4.5.0 tag of your Moodle instance:

        git checkout v4.5.0
        

      2. Do a fresh install
      3. Enable debugging mode (if using MDK, "mdk run mindev")
      4. Check out the latest version of the branch you're testing (e.g. on 405, git checkout MOODLE_405_STABLE)
      5. Go through the upgrade process.
      6. On the "Upgrading to new version" page, search for factor_sms
      7. Expected: There should be no debugging message shown
      8. Actual: The following debugging messages are shown

        Warning: Undefined property: stdClass::$weight in /Users/jun/Work/moodles/sm/moodle/admin/tool/mfa/factor/sms/db/upgrade.php on line 82
         
        Warning: Undefined property: stdClass::$duration in /Users/jun/Work/moodles/sm/moodle/admin/tool/mfa/factor/sms/db/upgrade.php on line 85
        

        1. (1) 9 Passed -- (Main)MDL-85116.png
          83 kB
          Kim Jared Lucas
        2. (1) 5 Passed -- (405)MDL-85116.png
          121 kB
          Kim Jared Lucas
        3. (2) 16 Passed -- (Main)MDL-85116.png
          85 kB
          Kim Jared Lucas

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Meirza Meirza
            Huong Nguyen Huong Nguyen
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            2 Vote for this issue
            Watchers:
            6 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, 2 minutes
                2h 2m

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