Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 3.7
-
Fix Version/s: 3.7
-
Component/s: Forum
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_37_STABLE
-
Fixed Branches:MOODLE_37_STABLE
-
Epic Link:
-
Pull from Repository:
-
Pull Master Branch:
MDL-65468-master -
Pull Master Diff URL:
Description
- Given I open a forum
- And I click "Create a new discussion topic"
- And I set the "Subject" to "Example"
- And I do not fill the "Message" field
- When I click on "Post to forum"
- Then I should see a form warning that the Message is a required field
- But I see a DB error
Debug info: ERROR: null value in column "subject" violates not-null constraint
DETAIL: Failing row contains (31, 0, 0, 2, 1556764614, 1556764614, 0, null, , null, 0, , 0, 0, 0, 0).
INSERT INTO mdl_forum_posts (discussion,parent,privatereplyto,userid,created,modified,mailed,subject,message,messageformat,messagetrust,mailnow) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) RETURNING id
[array (
'discussion' => 0,
'parent' => 0,
'privatereplyto' => 0,
'userid' => '2',
'created' => 1556764614,
'modified' => 1556764614,
'mailed' => 0,
'subject' => NULL,
'message' => '',
'messageformat' => NULL,
'messagetrust' => 0,
'mailnow' => 0,
)]
Error code: dmlwriteexception