We have several students who are unable to duplicate a collection in Mahara. Doing so results in an error about duplicate rows in a table (framework_evidence) with a unique index on certain fields (framevid_fraelevie_uk).
Full error log below:
[WAR] 88 (lib/errors.php:853) Failed to get a recordset: mysqli error: [1062: Duplicate entry '7-46-184220' for key 'framevid_fraelevie_uk'] in EXECUTE("INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES ('1106091', '7', '46', '184220', 0, '2021-03-11 12:33:02', '2021-03-11 12:33:02')")Command was: INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES (?, ?, ?, ?, ?, ?, ?) and values was (annotation:1106091,framework:7,element:46,view:184220,state:0,ctime:2021-03-1112:33:02,mtime:2021-03-1112:33:02)
Call stack (most recent first):
log_message(string(size 597), integer, true, true) at /var/www/html/mahara/lib/errors.php:89
log_warn(string(size 597)) at /var/www/html/mahara/lib/errors.php:853
SQLException->__construct(string(size 597)) at /var/www/html/mahara/lib/dml.php:1236
insert_record(string(size 18), object(stdClass)) at /var/www/html/mahara/lib/collection.php:666
Collection::create_from_template(array(size 3), integer) at /var/www/html/mahara/lib/view.php:7831
copyview(string(size 6), integer, null, integer) at /var/www/html/mahara/view/copy.php:34
[WAR] 88 (lib/dml.php:1236) Failed to get a recordset: mysqli error: [1062: Duplicate entry '7-46-184220' for key 'framevid_fraelevie_uk'] in EXECUTE("INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES ('1106091', '7', '46', '184220', 0, '2021-03-11 12:33:02', '2021-03-11 12:33:02')")Command was: INSERT INTO "framework_evidence" ("annotation", "framework", "element", "view", "state", "ctime", "mtime") VALUES (?, ?, ?, ?, ?, ?, ?) and values was (annotation:1106091,framework:7,element:46,view:184220,state:0,ctime:2021-03-1112:33:02,mtime:2021-03-1112:33:02)
Call stack (most recent first):
insert_record(string(size 18), object(stdClass)) at /var/www/html/mahara/lib/collection.php:666
Collection::create_from_template(array(size 3), integer) at /var/www/html/mahara/lib/view.php:7831
copyview(string(size 6), integer, null, integer) at /var/www/html/mahara/view/copy.php:34
Site unavailable
A nonrecoverable error occurred. This probably means you have encountered a bug in the system
Hi Alex,
Which version of Mahara are you using? How are you duplicating a collection with SmartEvidence? Are they copying it from an institution or site collection or from a personal one? It would be great to have more information available for testing.
Thank you
Kristina