Hi!
When entering course we receive error PHP catchable fatal error. How can we solve this problem? Version of Moodle is 2012062503.01.
Ivica
–
This error happens when a course has the Random Glossary Entry block but no Glossary.
Steps to reproduce:
1. Add a Glossary and Random Glossary Entry block to a course.
2. Delete the Glossary.
3. Try to access the course.
Debug info: Argument 2 passed to has_capability() must be an instance of context, null given, called in [dirroot]/blocks/glossary_random/block_glossary_random.php on line 134 and defined
Error code: codingerror
Stack trace:
- line 397 of /lib/setuplib.php: coding_exception thrown
- line 355 of /lib/accesslib.php: call to default_error_handler()
- line 134 of /blocks/glossary_random/block_glossary_random.php: call to has_capability()
- line 281 of /blocks/moodleblock.class.php: call to block_glossary_random->get_content()
- line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
- line 937 of /lib/blocklib.php: call to block_base->get_content_for_output()
- line 989 of /lib/blocklib.php: call to block_manager->create_block_contents()
- line 352 of /lib/blocklib.php: call to block_manager->ensure_content_created()
- line 21 of /theme/express/layout/general.php: call to block_manager->region_has_content()
- line 770 of /lib/outputrenderers.php: call to include()
- line 715 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
- line 246 of /course/view.php: call to core_renderer->header()
- duplicates
-
MDL-35158 Random Glossary block returns an error when you delete the linked glossary
-
- Closed
-