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

dml_missing_record_exception when stale(deleted) MoodleNet issuer is still set

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • MDL-77973-master
    • Hide
      1. See MDL-75316 for information about how to run the mock server
      2. Run the mock using the command generated from the build process
      3. In Moodle, create a new OAuth2 issuer for "MoodleNet', using the template button
      4. Change base URL to moodlenet.test and save (i.e. pointing to the mock host)
      5. Enable MoodleNet outbound sharing in site admin (enablesharingtomoodlenet)
      6. Set MoodleNet oauthservice to the service you just created
      7. Go to a course activity (click it to view it)
      8. In the more menu, you'll have a "Share to MoodleNet" action link
      9. Now, via site admin, just delete the OAuth2 issuer
      10. Go back to the activity view
      11. Verify you see a notice about a misconfigured OAuth 2 service
      12. Verify the page loads fine
      Show
      See MDL-75316 for information about how to run the mock server Run the mock using the command generated from the build process In Moodle, create a new OAuth2 issuer for "MoodleNet', using the template button Change base URL to moodlenet.test and save (i.e. pointing to the mock host) Enable MoodleNet outbound sharing in site admin (enablesharingtomoodlenet) Set MoodleNet oauthservice to the service you just created Go to a course activity (click it to view it) In the more menu, you'll have a "Share to MoodleNet" action link Now, via site admin, just delete the OAuth2 issuer Go back to the activity view Verify you see a notice about a misconfigured OAuth 2 service Verify the page loads fine

      1. See MDL-75316 for information about how to run the mock server
      2. Run the mock using the command generated from the build process
      3. In Moodle, create a new OAuth2 issuer for "MoodleNet', using the template button
      4. Change base URL to moodlenet.test and save (i.e. pointing to the mock host)
      5. Enable MoodleNet outbound sharing in site admin (enablesharingtomoodlenet)
      6. Set MoodleNet oauthservice to the service you just created
      7. Go to a course activity (click it to view it)
      8. In the more menu, you'll have a "Share to MoodleNet" action link
      9. Now, via site admin, just delete the OAuth2 issuer
      10. Go back to the activity view
        Expected: This loads fine, albeit without the "Share to MoodleNet" action link
        Actual: There's a dml exception thrown

        Can't find data record in database table oauth2_issuer.Debug info: 
         
        SELECT * FROM {oauth2_issuer} WHERE id = ?
        [array (
          0 => 43,
        )]
        Error code: invalidrecord
         
        Stack trace: line 1654 of /lib/dml/moodle_database.php: dml_missing_record_exception thrownline 1630 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()line 461 of /lib/classes/persistent.php: call to moodle_database->get_record()line 57 of /lib/classes/persistent.php: call to core\persistent->read()line 137 of /lib/classes/oauth2/api.php: call to core\persistent->__construct()line 4887 of /lib/navigationlib.php: call to core\oauth2\api::get_issuer()line 4343 of /lib/navigationlib.php: call to settings_navigation->load_module_settings()line 833 of /lib/pagelib.php: call to settings_navigation->initialise()line 962 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()line 226 of /lib/classes/navigation/views/secondary.php: call to moodle_page->__get()line 890 of /lib/pagelib.php: call to core\navigation\views\secondary->initialise()line 962 of /lib/pagelib.php: call to moodle_page->magic_get_secondarynav()line 70 of /theme/boost/layout/drawers.php: call to moodle_page->__get()line 1477 of /lib/outputrenderers.php: call to include()line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()line 171 of /mod/url/locallib.php: call to core_renderer->header()line 259 of /mod/url/locallib.php: call to url_print_header()line 104 of /mod/url/view.php: call to url_print_workaround()

            jaked Jake Dallimore
            jaked Jake Dallimore
            Michael Hawkins Michael Hawkins
            Andrew Lyons Andrew Lyons
            Andrew Lyons Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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