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

Activity chooser error when plugins are not fully uninstalled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.9
    • Fix Version/s: 3.9
    • Component/s: Course
    • Testing Instructions:
      Hide

      Prerequisites

      1. Login as Admin.
      2. Create a Course.
      3. Install a plugin of type 'Activity module' from the moodle plugins directory.
      4. Run the plugin installer.
      5. Manually remove the plugin from the /mod folder.
      6. Attempt to navigate anywhere in Moodle.
        • Moodle will automatically redirect you to a 'Plugin check' where you will be notified that the plugin is missing.
      7. Click on "Update Moodle database now".

      Test 1 (activity chooser)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any "Add an activity or resource" link.
        • make sure the activity chooser modal is now displayed (without an error in the browser's console) and you are able to add an activity.

      Test 2 (recommended activities)

      1. Go to Site administration > Courses > Recommended activities
        • make sure the 'Recommended activities' admin settings page is displayed (without an error) and you are able to recommend activities.

       

      Show
      Prerequisites Login as Admin. Create a Course. Install a plugin of type 'Activity module' from the moodle plugins directory. Run the plugin installer. Manually remove the plugin from the /mod folder. Attempt to navigate anywhere in Moodle. Moodle will automatically redirect you to a 'Plugin check' where you will be notified that the plugin is missing. Click on "Update Moodle database now". Test 1 (activity chooser) Go to the Course. Turn editing on. Click on any "Add an activity or resource" link. make sure the activity chooser modal is now displayed (without an error in the browser's console) and you are able to add an activity. Test 2 (recommended activities) Go to Site administration > Courses > Recommended activities make sure the 'Recommended activities' admin settings page is displayed (without an error) and you are able to recommend activities.  
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-68263-master
    • Story Points:
      3
    • Sprint:
      Activity Sprint 10

      Description

      To replicate

      1. login as admin
      2. install a plugin of type module from the moodle plugins directory
      3. run the plugin installer
      4. manually remove the plugin from the /mod folder
      5. navigate anywhere, Moodle will mention the missing plugin
      6. only execute the "update database now"
      7. navigate to any course
      8. turn editing on and try adding an activity

      Backtrace :

      "* line 7977 of /lib/moodlelib.php: coding_exception thrown
      * line 279 of /course/classes/local/repository/content_item_readonly_repository.php: call to component_callback_exists()
      * line 75 of /course/classes/local/repository/caching_content_item_readonly_repository.php: call to core_course\local\repository\content_item_readonly_repository->find_all_for_course()
      * line 206 of /course/classes/local/service/content_item_service.php: call to core_course\local\repository\caching_content_item_readonly_repository->find_all_for_course()
      * line 4287 of /course/externallib.php: call to core_course\local\service\content_item_service->get_content_items_for_user_in_course()
      * line 244 of /lib/externallib.php: call to core_course_external::get_course_content_items()
      * line 79 of /lib/ajax/service.php: call to external_api::call_external_function()
      "
      

        Attachments

          Activity

            People

            Assignee:
            Geshoski Mihail Geshoski
            Reporter:
            basbrands Bas Brands
            Peer reviewer:
            Neill Magill
            Integrator:
            Sara Arjona (@sarjona)
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/20

                Time Tracking

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