Affects Version/s: 2.2.2
ShowLogin as admin Enable developer debugging Remove config "defaulthomepage" from database (using phpmyadmin or any other tool) click on home page you should not see any notice, (also keep an eye on error log to make sure no notice/error is generated.)
- Login as admin
- Enable developer debugging
- Remove config "defaulthomepage" from database (using phpmyadmin or any other tool)
- click on home page
- you should not see any notice, (also keep an eye on error log to make sure no notice/error is generated.)
Fixed Branches:MOODLE_21_STABLE, MOODLE_22_STABLE
Pull from Repository:
Pull Master Branch:wip-mdl-32270
Pull Master Diff URL:
I had upgraded my Moodle site from 1.9 to 2.2.2+.
After upgrading the site I accessed front page, then I got a notice message "Notice: Undefined property: stdClass::$defaulthomepage in /var/www/html/moodle/index.php" on the top of the front page.
I didn't use mymoodle on 1.9.
So, if I change "Debug messages" from NORMAL to NONE, I'll not get the notice message. But now I'm debugging my Moodle2.2.2+ site.
I modified moodle/index.php as follows for avoiding the notice;
$urlparams = array();
// (Shirai): add from here
// if (empty($CFG->defaulthomepage)) $CFG->defaulthomepage = NULL;
// (Shirai): add to here
if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0)
This modification is not fundamental countermeasure.
Why $CFG->defaulthomepage does not assigning any value (including NULL)?
Which process of migrating is assign valid value of $CFG->defaulthomepage?