-
Bug
-
Resolution: Fixed
-
Minor
-
3.11.8, 4.0.2, 4.1
-
1
-
Team Hedgehog Sprint 1.3
If a block was added to the dashboard but the source code is no longer present (i.e. missing from disk), if you click Reset Dashboard for all users then upon login users will see:
Exception - Call to a member function instance_copy() on bool
More information about this error
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 124 of /my/lib.php: Error thrown
line 139 of /my/index.php: call to my_copy_page()
Steps to reproduce this issue
- Set up a Moodle site with at least one non-admin user.
- Install a block, for example block_mycoursestatus.
- From Site administration > Appearance > Default Dashboard page turn edit mode on and add the Mycourse Status block.
- Click Reset Dashboard for all users.
- Delete subdirectory blocks/mycoursestatus.
- You may be taken to the Plugins check page showing the plugin as missing from disk. Click Upgrade Moodle database now to return to the admin pages.
- From Site administration > Appearance > Default Dashboard page click Reset Dashboard for all users.
- Log in as a user.
Expected results
Either no error should appear to the user, or an error with information helpful to a site admin or sysadmin should appear, such as listing the name of the missing block, or the instance ID from mdl_block_instances.
Actual results
Error message Exception - Call to a member function instance_copy() on bool with no clue as to the cause.