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

PHP catchable fatal error - Random Glossary Entry block in course with no Glossary

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.3.3
    • Course, Glossary
    • MOODLE_23_STABLE
    • Hide

      Hide the Random Glossary Entry block in the site admin block settings.

      Show
      Hide the Random Glossary Entry block in the site admin block settings.

      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()

            poltawski Dan Poltawski
            imatotek Ivica Matotek
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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