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

Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: General, Navigation, Other, Usability
    • Labels:
      None
    • Affected Branches:
      MOODLE_25_STABLE

      Description

      We used to link to hidden Moodle pages to be able to add links to our Moodle pages in blocks, labels, etc., but it is no longer working.

      I get the following error:

      Coding error detected, it must be fixed by a programmer: PHP catchable fatal error

      Debug info: Argument 3 passed to global_navigation::load_activity() must be an instance of navigation_node, boolean given, called in [dirroot]/lib/navigationlib.php on line 1205 and defined
      Error code: codingerror
      Stack trace:
      line 406 of /lib/setuplib.php: coding_exception thrown
      line 2019 of /lib/navigationlib.php: call to default_error_handler()
      line 1205 of /lib/navigationlib.php: call to global_navigation->load_activity()
      line 2937 of /lib/navigationlib.php: call to global_navigation->initialise()
      line 766 of /lib/pagelib.php: call to navbar->has_items()
      line 4 of /theme/archaius/layout/general.php: call to moodle_page->has_navbar()
      line 847 of /lib/outputrenderers.php: call to include()
      line 777 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line ? of unknownfile: call to core_renderer->header()
      line 1479 of /lib/setuplib.php: call to call_user_func_array()
      line 79 of /mod/page/view.php: call to bootstrap_renderer->__call()
      line 79 of /mod/page/view.php: call to bootstrap_renderer->header()

      I thought perhaps there was an issue with our Moodle code, or database, so I reinstalled Linux and Moodle 2.5, and tried again, to no avail.

      To recreate the issue I create a Page within a course, copy the url, then make the Page hidden, then link to the page from somewhere else within the site. As an admin, it works just fine, when I switch my role to a student it gives me the PHP error.

      This had worked in past iterations of Moodle.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              random_hero random hero
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Huong Nguyen, Barbara Ramiro, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: