-
New Feature
-
Resolution: Fixed
-
Critical
-
2.3.1, 2.3.4, 2.4.1, 2.9
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_29_STABLE
-
MOODLE_29_STABLE
-
MDL-34684_master -
-
20
-
BACKEND Sprint 18
Some sites have corrupted hierarchies between course categories, in course_categories->parent field or in course_categories->path. The cause of this issue is not present in the current maintained versions and not all sites are affected by it, so instead of adding an upgrade process we add an extra health check process to explain to the users how to fix the problem, proposing them a sql query to run into the database.
Edited summary and description
--------------------------------------------------------------
Original description
upgraded from moodle.2.1.1 to moodle.2.2.4 and then finally to Moodle 2.3.1+ (Build: 20120726)
PHP PHP 5.3.2-1ubuntu4.17
MySQL 5.1.63-0ubuntu0.10.04.1-log
Ubuntu 10.04.4 LTS
When I click on a course category it gives me this error (with full debug on):
Notice: Undefined index: 5 in /var/www/moodle/lib/navigationlib.php on line 1796 Notice: Trying to get property of non-object in /var/www/moodle/lib/navigationlib.php on line 1797 Notice: Trying to get property of non-object in /var/www/moodle/lib/navigationlib.php on line 1801
|
|
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 1809 of /lib/navigationlib.php: coding_exception thrown
|
line 1195 of /lib/navigationlib.php: call to global_navigation->load_all_categories()
|
line 3039 of /lib/navigationlib.php: call to global_navigation->initialise()
|
line 781 of /lib/pagelib.php: call to navbar->has_items()
|
line 3 of /theme/aardvark_postit/layout/default.php: call to moodle_page->has_navbar()
|
line 765 of /lib/outputrenderers.php: call to include()
|
line 712 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
|
line ? of unknownfile: call to core_renderer->header()
|
line 1445 of /lib/setuplib.php: call to call_user_func_array()
|
line ? of unknownfile: call to bootstrap_renderer->__call()
|
line 199 of /course/category.php: call to bootstrap_renderer->header()
|
As an admin I can go to the course categories with no errors. But when I'm not logged in, I can't. Or other roles.
This fix script doesn't change anything:
<?php
|
|
require_once('config.php');
|
|
echo 'Starting fix_course_sortorder()...';
|
fix_course_sortorder();
|
echo 'done';
|
Summary and description edited, original summary was:
Category path order is incorrect and/or there are missing categories
- has a non-specific relationship to
-
MDL-40338 META: Evaluate Remote-Learner ELIS "hacks" for core
-
- Closed
-
- is duplicated by
-
MDL-48584 After upgrade categories are broken
-
- Closed
-
- will be (partly) resolved by
-
MDLSITE-3648 Accept @dataProvider as a valid tag
-
- Closed
-
- will help resolve
-
MDL-46304 Upgraded From 2.2.4 to 2.7: Category path order is incorrect and/or there are missing categories
-
- Closed
-