-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.3.3, 3.3.4
-
MOODLE_33_STABLE
When trying to copy a number of courses (backup and restore them as a new course) with user data and forum subscriptions, Moodle returns this error message while restoring the course:
Error writing to database
×Debug info: ERROR: duplicate key value violates unique constraint "mdl_forusubs_usefor_uix"
DETAIL: Key (userid, forum)=(<<ID>>, <<ID>>) already exists.
INSERT INTO mdl_forum_subscriptions (userid,forum) VALUES($1,$2) RETURNING id
[array (
'userid' => '<<ID>>',
'forum' => <<ID>>,
)]
Error code: dmlwriteexception
Steps to reproduce:
- Backup a course which includes user data and forum subscriptions
- Restore the backup as a new course including user data. Moodle should give the above mentioned error message.
I was hoping that this issue was fixed with MDL-60669, but it's still here (having Moodle 3.3.4).
- duplicates
-
MDL-60669 Course restore can fail if it includes discussion forums
-
- Closed
-