Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

by Satvir Singh -
Number of replies: 3

Moodle is being installed on Windows Server 2012 R12, IIS 8.5. We are facing problem at page
During installation of latest versions MOODLE 3.10.1+ following error occurred

Please help in my installation.

Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

More information about this error

Debug info:
Error code: codingerror

Stack trace:
  • line 930 of \lib\classes\user.php: coding_exception thrown
  • line 300 of \user\editlib.php: call to core_user::get_property_default()
  • line 150 of \user\editadvanced_form.php: call to useredit_shared_definition()
  • line 214 of \lib\formslib.php: call to user_editadvanced_form->definition()
  • line 155 of \user\editadvanced.php: call to moodleform->__construct()
Output buffer: <div class="notifytiny debuggingmessage" data-rel="debugging">Capability "moodle/contentbank:access" was not found! This has to be fixed in code.<ul style="text-align: left" data-rel="backtrace"><li>line 453 of \lib\accesslib.php: call to debugging()</li><li>line 2940 of \lib\navigationlib.php: call to has_capability()</li><li>line 1312 of \lib\navigationlib.php: call to global_navigation->add_front_page_course_essentials()</li><li>line 3037 of \lib\navigationlib.php: call to global_navigation->initialise()</li><li>line 84 of \user\editadvanced.php: call to global_navigation->find()</li></ul></div><br /> <b>Notice</b>: Undefined property: stdClass::$navcourselimit in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\navigationlib.php</b> on line <b>3051</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$maxbytes in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editadvanced.php</b> on line <b>123</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$maxbytes in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editadvanced.php</b> on line <b>145</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultcity in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>696</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$country in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>697</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$calendartype in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>702</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultpreference_mailformat in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>719</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultpreference_maildigest in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>721</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultpreference_maildisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>723</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultpreference_autosubscribe in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>725</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$defaultpreference_trackforums in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\lib\classes\user.php</b> on line <b>727</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>450</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>487</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>487</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>487</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>487</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$fullnamedisplay in <b>C:\inetpub\wwwroot\dr-satvir-php-sites\moodle.ptu.ac.in\user\editlib.php</b> on line <b>493</b><br />


Average of ratings: -
In reply to Satvir Singh

Re: Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

If this is a new site I would delete the database and start the installation again. From the errors you've shared it looks like the database tables have been created but some (or all) of the data in them is missing. This data should get added during the installation.

For example for error "Capability "moodle/contentbank:access" was not found!", this should be in the mdl_capabilities table:

SELECT id, name, contextlevel FROM mdl_capabilities WHERE name = 'moodle/contentbank:access';
+-----+---------------------------+--------------+
| id  | name                      | contextlevel |
+-----+---------------------------+--------------+
| 627 | moodle/contentbank:access |           50 |
+-----+---------------------------+--------------+

For errors "Undefined property: stdClass::$navcourselimit" and "Undefined property: stdClass::$maxbytes" these should be in mdl_config:

SELECT name, value FROM mdl_config WHERE name IN ('navcourselimit', 'maxbytes');
+----------------+-------+
| name           | value |
+----------------+-------+
| maxbytes       | 0     |
| navcourselimit | 10    |
+----------------+-------+
In reply to Leon Stringer

Re: Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

by Aleksandar Stojicic -
Hi Leon, i have pretty much same issues... how to restart db installation properly? drop and recreate database or? I am using Moodle 3.11.4 installation
In reply to Satvir Singh

Re: Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

by Anil Karwankar -
Add a Guest user directly in database using Moodle adminer with index 1