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

Activity chooser does not display if site contains plugins missing from disk

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisites

      1. Login as Admin
      2. Create a Course
      3. Go to the Course

      Test 1

      1. Force a failure when fetching the activity module data:
        1. Physically remove (or move) a module (ex. mod/data) directory from the server (without properly uninstalling)
        2. Purge the caches (module directory is sill removed without uninstalling).
        3. Restore the module directory back to the mod folder (without purging the cache).
      2. Reload the Course page in the browser.
      3. Open the activity chooser.
        • confirm that an error notification is displayed within the activity chooser informing that the error prevents adding activities or resources.

      Test 2

      1. Checkout the branch before the integration of this issue:
        1. For master - run the following command

          git checkout a1087ef6092a70fda62c76018e2b97aae5cf9385

        2. If you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command:

          mdk run version.php

        3. For the 3.9 branch - run the following command

          git checkout 455e7f50d816c20da96f07b56015ac64df529434

        4. If you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command:

          mdk run version.php

      2. Manually remove the Guest user from the database and purge cache.
        1. This includes removing the "siteguest" from the config table.
        2. The guest user is the record in the user table with the username "guest".
        3. You can run the following query - DELETE FROM mdl_user WHERE username LIKE '%guest%'
      3. Reload the Course page in the browser. (do not upgrade the instance)
      4. Open the activity chooser.
        • confirm that you see the arrow constantly turning.

      Test 3

      1. We now need to get our branch back to normal, but don't run through the upgrade just yet.
        1. Run the following command (when testing the master branch) git checkout master
        2. Run the following command (when testing the 3.9 branch) git checkout MOODLE_39_STABLE
      1. Purge the cache, and on the course page open the activity chooser.
        • Confirm that you now see a message that the site guest user is missing.
      2. Now run through the upgrade.
      3. Check that the guest user has been restored.
        • The guest user is the user in the the user table with the username of 'guest'.
        • confirm a guest user exists in the database in both the config and user table.
      4. Reload the Course page in the browser.
      5. Open the activity chooser.
        • confirm that there is NOT an error within the activity chooser and the activity chooser is functional.

       

      Show
      Prerequisites Login as Admin Create a Course Go to the Course Test 1 Force a failure when fetching the activity module data: Physically remove (or move) a module (ex. mod/data) directory from the server (without properly uninstalling) Purge the caches (module directory is sill removed without uninstalling). Restore the module directory back to the mod folder (without purging the cache). Reload the Course page in the browser. Open the activity chooser. confirm that an error notification is displayed within the activity chooser informing that the error prevents adding activities or resources. Test 2 Checkout the branch before the integration of this issue: For master - run the following command git checkout a1087ef6092a70fda62c76018e2b97aae5cf9385 If you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command: mdk run version.php For the 3.9 branch - run the following command git checkout 455e7f50d816c20da96f07b56015ac64df529434 If you hit a screen or message saying that your version of code is older than the current code, then run the following mdk command: mdk run version.php Manually remove the Guest user from the database and purge cache. This includes removing the "siteguest" from the config table. The guest user is the record in the user table with the username "guest". You can run the following query - DELETE FROM mdl_user WHERE username LIKE '%guest%' Reload the Course page in the browser. (do not upgrade the instance) Open the activity chooser. confirm that you see the arrow constantly turning. Test 3 We now need to get our branch back to normal, but don't run through the upgrade just yet. Run the following command (when testing the master branch) git checkout master Run the following command (when testing the 3.9 branch) git checkout MOODLE_39_STABLE Purge the cache, and on the course page open the activity chooser. Confirm that you now see a message that the site guest user is missing. Now run through the upgrade. Check that the guest user has been restored. The guest user is the user in the the user table with the username of 'guest'. confirm a guest user exists in the database in both the config and user table. Reload the Course page in the browser. Open the activity chooser. confirm that there is NOT an error within the activity chooser and the activity chooser is functional.  
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull 3.9 Branch:
      MDL-69079-39-1
    • Pull Master Branch:
      MDL-69079-master-1
    • Story Points:
      1
    • Sprint:
      4.0 holding pattern, 4.0 holding pattern 2, 4.0 holding pattern 3

      Description

      In one of our Moodle 3.9 testing sites, we've found the new improved activity picker does not load in the following circumstances:

      • a plugin has been deleted from the server, but uninstall hasn't taken place ==> this makes the plugin 'missing from disk'.

      Up until Moodle 3.8, it was possible to keep plugin configuration data in the database, while not having the files of the plugin on the server. This didn't block properly showing the activity picker.

      We sometimes do this, to prevent losing the configuration data while the plugin is undergoing maintenance. 

      When you'd completely process the uninstall for an activity mod plugin, you lose all configuration and have to completely reinstall it once maintenance is finished. 

      Activity chooser does not display if site contains plugins missing from disk.

       

        Attachments

        1. activity-chooser-error-alert.png
          activity-chooser-error-alert.png
          36 kB
        2. course-error-37.png
          course-error-37.png
          179 kB
        3. course-error-38.png
          course-error-38.png
          217 kB
        4. module-removed.png
          module-removed.png
          185 kB
        5. module-removed-purged-caches.png
          module-removed-purged-caches.png
          76 kB
        6. module-restored.png
          module-restored.png
          160 kB
        7. module-restored-purged-caches.png
          module-restored-purged-caches.png
          78 kB
        8. photo_2020-07-29_17-13-16.jpg
          photo_2020-07-29_17-13-16.jpg
          22 kB
        9. Screenshot 2020-06-17 at 17.16.34.png
          Screenshot 2020-06-17 at 17.16.34.png
          124 kB
        10. Screenshot 2020-06-17 at 17.41.57.png
          Screenshot 2020-06-17 at 17.41.57.png
          146 kB

          Issue Links

            Activity

              People

              Assignee:
              Geshoski Mihail Geshoski
              Reporter:
              jwelshoff Joost Elshoff
              Peer reviewer:
              Mathew May
              Integrator:
              Adrian Greeve
              Tester:
              Peter Dias
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              4 Vote for this issue
              Watchers:
              18 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour, 10 minutes
                  2d 1h 10m