-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.9.8
-
MOODLE_39_STABLE
-
1
WHAT I EXPECTED: The Simple Single Forum to be created and display without errors (when Developer debugging is on)
WHAT ACTUALLY HAPPENED: An error displays, it seems because the default discussion post had a NULL value for "Attachment" (and possibly some other fields)
FULL STEPS:
- Site Administration > Development > Debugging > Debug messages> set to "DEVELOPER"
- Open a test Course.
- Turn on Editing
- Click add an activity or resource
- Click 'Forum'
- Add Forum name 'Simple Forum' (or any other name)
- Select Forum type "A single simple discussion"
- Click "Save and display"
- The following error will displayed:
Simple Forum
Exception - Argument 12 passed to mod_forum\local\entities\post::__construct() must be of the type boolean, null given, called in [dirroot]/mod/forum/classes/local/factories/entity.php on line 161
More information about this error
Debug info:
Error code: generalexceptionmessage
Stack trace:
- line 95 of /mod/forum/classes/local/entities/post.php: TypeError thrown
- line 161 of /mod/forum/classes/local/factories/entity.php: call to mod_forum\local\entities\post->__construct()
- line 97 of /mod/forum/classes/local/vaults/post.php: call to mod_forum\local\factories\entity->get_post_from_stdclass()
- line ? of unknownfile: call to mod_forum\local\vaults\post->mod_forum\local\vaults
{closure}
()
- line 98 of /mod/forum/classes/local/vaults/post.php: call to array_map()
- line 160 of /mod/forum/classes/local/vaults/db_table_vault.php: call to mod_forum\local\vaults\post->from_db_records()
- line 187 of /mod/forum/classes/local/vaults/db_table_vault.php: call to mod_forum\local\vaults\db_table_vault->transform_db_records_to_entities()
- line 170 of /mod/forum/classes/local/vaults/db_table_vault.php: call to mod_forum\local\vaults\db_table_vault->get_from_ids()
- line 215 of /mod/forum/view.php: call to mod_forum\local\vaults\db_table_vault->get_from_id()
Note: If you query the mdl_forum_posts database table of the related discussion for that single discussion forum, the "attachment" field is NULL. But if it is changed to "0", the error disappears and the forum works correctly.
- has a non-specific relationship to
-
MDL-66338 Forum error on some forums after upgrade to 3.7.1
-
- Open
-