-
Bug
-
Resolution: Fixed
-
Critical
-
3.4.2, 3.5
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_34_STABLE
-
MDL-61913-master -
The basic prerequisite is that you have global search configured and enabled.
If you backup and restore, or import, from a course with blocks, and there are any duplicate blocks that will be skipped, then you will get a fatal error:
Debug info: SELECT id,parentcontextid FROM {block_instances} WHERE id = ?
|
[array (
|
0 => 0,
|
)]
|
Error code: invalidrecord
|
×Stack trace:
|
line 1546 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
|
line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
|
line 6920 of /lib/accesslib.php: call to moodle_database->get_record()
|
line 5595 of /backup/moodle2/restore_stepslib.php: call to context_block::instance()
|
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_block_search_index->define_execution()
|
line 181 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
|
line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
|
line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
|
line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
|
line 224 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
|
line 135 of /backup/restore.php: call to restore_ui->execute()
|
You can recreate this simply by have two courses, 1 and 2. In 1 add the Activities block.
Now import from 1 to 2 - should work normally.
Now import from 1 to 2 again, you will get a fatal error like above.
- has a non-specific relationship to
-
MDL-58957 Global search: Make it possible to search blocks
- Closed
- has been marked as being related by
-
MDL-61824 Restored contexts waiting to be indexed may be already deleted
- Closed
- is a regression caused by
-
MDL-55356 Add restored contents support to global search API
- Closed