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

Upgraded From 2.2.4 to 2.7: Category path order is incorrect and/or there are missing categories



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 2.7
    • None
    • None
    • MySQL


      Ubuntu 14.04 LTS. Moodle 2.7.(Build: 20140626) (VM test server).
      mysql, php

      Moodle History ( as it appears to be relevant in prior cases)
      1.9, upgraded to 2.2.4 (Production) with no problems accessing categories.

      Ran Upgrade to 2.7 worked fine apart with no reported errors.
      Initially looks ok and Goes into courses, but:

      Clicking on any link (Menu at the top of the screen,Category List, Breadcrumb trail within a course)that tries to load a category (any category) e.g. my_moodle_site/course/index.php?categoryid=37

      "Coding error detected, it must be fixed by a programmer: Category path order is incorrect and/or there are missing categories

      Debug info:
      Error code: codingerror
      Stack trace:
      line 1707 of /lib/navigationlib.php: coding_exception thrown
      line 1149 of /lib/navigationlib.php: call to global_navigation->load_all_categories()
      line 3384 of /lib/navigationlib.php: call to global_navigation->initialise()
      line 718 of /lib/pagelib.php: call to settings_navigation->__construct()
      line 768 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
      line 135 of /blocks/settings/block_settings.php: call to moodle_page->__get()
      line 294 of /blocks/moodleblock.class.php: call to block_settings->get_content()
      line 236 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      line 993 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 1045 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 361 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
      line 45 of /theme/clean/layout/columns3.php: call to core_renderer->standard_head_html()
      line 877 of /lib/outputrenderers.php: call to include()
      line 807 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 59 of /course/index.php: call to core_renderer->header() "

      Of potential note is that prior to upgrading, the Moodle in use does have hidden categories with visible courses (but not within category id 37). Also nested categories etc.

      Searches have not shown this elsewhere for Moodle 2.7,
      However, it could well be related to this issue as similar situation in earlier moodles (2.3.1, 2.3.4, 2.4.1): MDL-34684.

      Also of Note and likely related: Anywhere the Navigation panel is visible, eg Within 'My Home'. If I open the Navigation panel, My Courses is correctly showing categories of the courses.
      However, if I click on the expand bit to the left of Courses on that menu I get the error:
      "* line 115 of /lib/ajax/getnavbranch.php: coding_exception thrown"

      Cause Found:
      one entry in mdl_course_category had it's parent field incorrect. Took downloading the table and manually checking over it.


        Issue Links



              Unassigned Unassigned
              richardprice Richard Price
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              0 Vote for this issue
              4 Start watching this issue