"upgradesettings.php" keeps coming up after update to version 2.4

"upgradesettings.php" keeps coming up after update to version 2.4

Eric Horn -
回帖数:9

Hi,

I just updated two instances of Moodle from version 2.3 (last week's build) to version 2.4. On one Moodle installation I don't have any problems after the update. On the other installation at the end of the installation the usual page with the upgrade settings where shown - but every time I saved the new settings, I was redirected back to the page "upgradesettings.php" with only one setting left: "New settings - Front page settings --> Include a topic section (numsections)". I can change this setting to on or off - but every time I click on "save settings", I get redirected to the same page.

The same thing happens when I click on the link "Settings / Site Administration / Notifications" on the front page. Every time I am redirected to the "upgradesetting.php", I can read the message: "The settings shown below were added during your last Moodle upgrade. Make any changes necessary to the defaults and then click the 'Save changes' button at the bottom of this page." - and although I save the setting for "Include a topic section" again and again, I am always redirected back to the same page. Does anybody know where I can stop Moodle thinking that this settings has not been set after the installation. Can I find it within the database?

Thanks for help in advance

Eric.

回复Eric Horn

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Christoph Stadlbauer -

Same Problem here...

Going to Server-Notifications

debugging displays:
Notice: Undefined property: stdClass::$numsections in /var/www/moodle.brgenns.ac.at/moodle/lib/adminlib.php on line 3381
Zum Hauptinhalt
Die Weiterleitung sollte automatisch funktionieren - falls nichts passiert, klicken Sie bitte auf den nachfolgenden Link
(Weiter)
Error output, so disabling automatic redirect.

After that "New settings-Front page settings" ist displayed:

The option "Include a topic section" (numsections) is displayed.

No matter what option I choose for this setting I'll get directed to the same page over and over.

Debugging displays:
Notice: Undefined property: stdClass::$numsections in /var/www/moodle.brgenns.ac.at/moodle/lib/adminlib.php on line 3381 Notice: Undefined property: stdClass::$numsections in /var/www/moodle.brgenns.ac.at/moodle/lib/adminlib.php on line 3381 Notice: Undefined property: stdClass::$numsections in /var/www/moodle.brgenns.ac.at/moodle/lib/adminlib.php on line 3381 Notice: Undefined property: stdClass::$numsections in /var/www/moodle.brgenns.ac.at/moodle/lib/adminlib.php on line 3381

Debugging also displays:
Notice: Undefined index: numsections in /var/www/moodle.brgenns.ac.at/moodle/index.php on line 111
on the Front page

Thanks in advance

Christoph

回复Christoph Stadlbauer

Re: "upgradesettings.php" keeps coming up after update to version 2.4

James Rudd -

I just updated my test site and experienced the same problem.

 

Top of page has Notice: Undefined property: stdClass::$numsections in /moodle/test/htdocs/lib/adminlib.php on line 3381

and it kept showing the same "Include a topic section" setting

Goind direct to /admin shows

This page should automatically redirect. If nothing is happening please use the continue link below.

Error output, so disabling automatic redirect.

Before going back again to that setting. I tried disabling debugdisplay in database and now it hides the message but still won't go past that setting.

回复Eric Horn

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Ken Task -
Particularly helpful Moodlers的头像

mdl_course_sections is the table, I think.

column names and settings for first row in that table on a freshly installed 2.4 that's not having same issues:

  id course section name summary summaryformat sequence visible availablefrom availableuntil showavailability groupingid
1 1 0     1   1 0 0

0

Other than that ... ????  Sorry!

'spirit of sharing', Ken

回复Ken Task

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Christoph Stadlbauer -

mdl_course_sections stores description, visibility and so on which should not be related to a problem with the Front page settings after upgrading.

It should rather be a value in mdl_config like

select * from mdl_config where name like "maxcategorydepth";
+-----+------------------+-------+
| id | name | value |
+-----+------------------+-------+
| 487 | maxcategorydepth | 1 |
+-----+------------------+-------+
1 row in set (0.00 sec)

but inserting the value (insert into mdl_config (name,value) values ("numsections",1);) doesn't resolve the problem since the value is either not properly read or read from somewhere else.

回复Ken Task

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Christoph Stadlbauer -

Ok, in 2.3 the setting is saved to mdl_course in the first row to the column numsections, but in my 2.4 install this column is missing (and two others) which seems to be intentional because there is a new table mdl_course_format_options.

on a clean install this looks like this,

+----+----------+--------+-----------+-------------+-------+
| id | courseid | format | sectionid | name | value |
+----+----------+--------+-----------+-------------+-------+
| 1 | 1 | site | 0 | numsections | 1 |
+----+----------+--------+-----------+-------------+-------+

but inserting this in the other install doesn't help either.

and I don't have time right now to step through the code

Christoph

回复Christoph Stadlbauer

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Dan Poltawski -
Hi Christoph,

This problem is almost certainly related to the course format of your site course, It will shortly be addressed in: MDL-36840
回复Dan Poltawski

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Eric Horn -

Hi Dan,

thanks a lot for your help and the link. Changing the value "format" of the site course in the table "mdl_course" of the db from "social" to "site" by hand did the trick! Seems to be a problem when you have an installation that is running a long time and was updated several times. My installation originally was based on Moodle 1.5 (or 1.6, I don't remember) and was upgraded step by step every time a new version was released. Because the database has never been changed by hand before, this must be a problem which results from older versions of Moodle. - After changing the value everything runs fine!

回复Dan Poltawski

Re: "upgradesettings.php" keeps coming up after update to version 2.4

John Holmes -

Dan,

Your link worked for us as well. In the database change from social to site and our site started working perfectly.

Thanks

回复John Holmes

Re: "upgradesettings.php" keeps coming up after update to version 2.4

Dan Poltawski -
Great to hear, the fix to this will be in the weekly release of Moodle 2.4 this week.