Just experienced this issue in Moodle v2.4.6
I was working in the course categories view and suspect I may have caused the problem* by doing one of the following. In the situation where I had:
Category A
Category B
Category C
Category D
- With Categories B and C both empty, I deleted Category B without first deleting Category C.
- With a different set of categories, but in a similar arrangement, I moved Category C from under Category B to Category D
Thanks to the tips provided by participants in this thread, I fixed the problem by creating a new category structure and used the Moodle interface to move the courses to the new categories.
* When I have a moment, I'll go back and test my theory on our sandbox instance and report the results back here and to the Moodle Tracker.
Hrynkiw
Kwantlen Polytechnic