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

Handling for deleted activities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.1
    • 3.1
    • Global search
    • MOODLE_31_STABLE
    • MOODLE_31_STABLE
    • MDL-53272_master
    • Hide

      Would be better if you don't use an specially big site to test this.

      1. Setup global search and solr https://docs.moodle.org/dev/Global_search
      2. Index your site's data
      3. Search for something as an admin, and open one of the results in a new tab
      4. Delete whatever the result is (if it is a page, delete the page activity, if it is a forum post, delete the discussion...)
      5. Refresh the search results page or perform another search with the same search query
      6. You should not see any fatal error and results should be listed without including the deleted result
      Show
      Would be better if you don't use an specially big site to test this. Setup global search and solr https://docs.moodle.org/dev/Global_search Index your site's data Search for something as an admin, and open one of the results in a new tab Delete whatever the result is (if it is a page, delete the page activity, if it is a forum post, delete the discussion...) Refresh the search results page or perform another search with the same search query You should not see any fatal error and results should be listed without including the deleted result

      Right now, if you delete an activity that has been index, delete it, then enter a search that would return it, you will get a fatal DB error:

      Debug info: SELECT * FROM {context} WHERE id = ?
      [array (
      0 => 47,
      )]
      Error code: invalidrecord
       
      Stack trace:
      line 1461 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
      line 1437 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 5449 of /lib/accesslib.php: call to moodle_database->get_record()
      line 1401 of /lib/weblib.php: call to context::instance_by_id()
      line 447 of /search/classes/document.php: call to format_string()
      line 84 of /search/classes/output/renderer.php: call to core_search\document->export_for_template()
      line 67 of /search/classes/output/renderer.php: call to core_search\output\renderer->render_result()
      line 106 of /search/index.php: call to core_search\output\renderer->render_results()
      

            dmonllao David Monllaó
            emerrill Eric Merrill
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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