-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
4.0.4
-
None
-
MOODLE_400_STABLE
Practical example:
- go to a course
- open an activity in edit mode
- add the "virtu" tag
- open another activity, even of the same course in edit mode
- add the "virtù" tag and save everything
The error generated will be: "Error writing to database
More information about this error
Debug info: Duplicate entry '1-virtu' for key 'bug_tag_tagnam_uix'
INSERT INTO bug_tag (isstandard, userid, timemodified, tagcollid, rawname, name) VALUES (?,?,?,?,?,?)
[array (
0 => 0,
1 => '2',
2 => 1668092563,
3 => '1',
4 => 'virtue',
5 => 'virtue',
)]
Error code: dmlwriteexception × Dismiss this notification
Stack trace:
line 489 of \ lib \ dml \ moodle_database.php: dml_write_exception thrown
line 291 of \ lib \ dml \ moodle_read_slave_trait.php: call to moodle_database-> query_end ()
line 1357 of \ lib \ dml \ mysqli_native_moodle_database.php: call to mysqli_native_moodle_database-> query_end ()
line 1403 of \ lib \ dml \ mysqli_native_moodle_database.php: call to mysqli_native_moodle_database-> insert_record_raw ()
line 180 of \ tag \ classes \ tag.php: call to mysqli_native_moodle_database-> insert_record ()
line 369 of \ tag \ classes \ tag.php: call to core_tag_tag :: add ()
line 772 of \ tag \ classes \ tag.php: call to core_tag_tag :: create_if_missing ()
line 679 of \ course \ modlib.php: call to core_tag_tag :: set_item_tags ()
line 168 of \ course \ modedit.php: call to update_moduleinfo () "
this is because the collation of the table is utf8mb4_unicode_ci, this collation does not differentiate between uppercase, lowercase, accents ... etc ... Furthermore, the add_instance function of the core_tag_tag class fails to check the uniqueness of the record to be inserted.
I remain available.
- duplicates
-
MDL-65556 Error in tags with accents
-
- Open
-