Upgrading from 2.3 to 2.8.1 error

Upgrading from 2.3 to 2.8.1 error

by srečko štok -
Number of replies: 6

After upgrading from 2.3 to 2.8.1 (everything went smooth, seemingly) I get, when I click on category, an error message:

Notice: Undefined offset: 17 in /var/www/html/moodle/lib/navigationlib.php on line 1699
Notice: Trying to get property of non-object in /var/www/html/moodle/lib/navigationlib.php on line 1700
Notice: Trying to get property of non-object in /var/www/html/moodle/lib/navigationlib.php on line 1704


Category path order is incorrect and/or there are missing categories

Need some help please.

PHP Version 5.4.33

Average of ratings: -
In reply to srečko štok

Re: Upgrading from 2.3 to 2.8.1 error

by Colin G -

Have you tried purging your cache ?

Site administration > Development > Purge all caches in the Settings section.

In reply to Colin G

Odg: Re: Upgrading from 2.3 to 2.8.1 error

by srečko štok -

Thanks for your answer. It didn't help though. Still the same issue. I managed to find a direct link to one of the courses then i switch off first page settings. Now I have a list of all courses on the first page and they all work fine, but as soon as I click on category  i get an error message posted above.

Thank you anyway.

In reply to srečko štok

Re: Odg: Re: Upgrading from 2.3 to 2.8.1 error

by Colin G -
In reply to Colin G

Re: Odg: Re: Upgrading from 2.3 to 2.8.1 error

by Colin G -

I was able to reproduce this error by changing the parent to itself. Here is my sql query:


UPDATE `moodle`.`mdl_course_categories` SET `parent` = '2' WHERE `mdl_course_categories`.`id` =2;

In reply to Colin G

Odg: Re: Odg: Re: Upgrading from 2.3 to 2.8.1 error

by srečko štok -

Thanks for your answer Colin G. I was to busy too try your solution. But first of all  i need to create testing environment. I should have done this before  I started the upgrade.

Thanks again.

In reply to srečko štok

Odg: Re: Odg: Re: Upgrading from 2.3 to 2.8.1 error

by srečko štok -

It's an end of a school year in our country so I finally managed to take a look at the database. There  actually was a category with the same id and a parent number. There was no course in that category so I simply deleted it.

Now all Works as it should. Thanks Colin G.