Discussion posts and replies are publicly visible
Its foreign key constraint violation , verify on the data which is getting inserted foreign key is going as null
parent table not having the value you want to save in the column in which foreign key is applied