-
Bug
-
Resolution: Fixed
-
Blocker
-
2.7.3, 2.8.1, 2.9, 3.1.4, 3.2.1, 3.3
-
MySQL
-
MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
wip-
MDL-48228-master-v2 -
Moderate
-
-
3.3 sprint 4
-
Epic
Thanks to okumura for bringing this to our attention.
This is a particularly bad bug that where posting a message containing a character outside of the Unicode BMP (16-bit Basic Multilingual Plane) such as emoji results in a "Error writing to database" message and a complete loss of what was being written (no draft is restored after the error message is displayed.
It's not just emoji that are affected as there are some Japanese kanji that are beyond the scope of the UTF-16 BMP, e.g. the kanji for "shikaru" (to scold), so this isn't just for razzle-dazzle - this actually impedes functional communication.
It'd be nice if Moodle could filter out offending characters before database error occurs, or perhaps fix the behavior entirely if possible.
Current known affected DBs:
- MySQL 5.5.40
Current known unaffected DBs:
- Postgres
Current untested DBs:
- Oracle
- MSSQL
- MariaDB
Reproduction steps
- Use a browser / OS with at least partial emoji support
- OS X: Safari, Firefox
- Windows 7+: IE, Firefox
- Linux: Firefox (with extra fonts installed, see https://www.kirsle.net/blog/entry/make-emoji-work-in-linux )
- Download / open the attached html file.
- NOTE: the test characters can't be directly embedded in this description, as JIRA exhibits the same issue and will just throw your post away if there's anything in it it doesn't underrstand.
- Set the autosave delay for Atto to something short, like 5 seconds.
- Create a forum activity, and in your new forum...
- Create a new discussion, with the body set to the first element in the attached html (i.e. [notebook] memo) and wait for autosave to kick in.
- If your DB is affected: instead of a successful autosave, you'll see an error: "Could not connect to the server. If you submit this page now, your changes may be lost."
- Hit submit.
- If your DB is affected: instead of notifying you of a successful post, you'll see an error: "Error writing to database" and upon returning to the create discussion page, as no draft was saved, your entire post is gone.
- Repeat test with second element in the attached html file.
- Create a new discussion, with the body set to the first element in the attached html (i.e. [notebook] memo) and wait for autosave to kick in.
- caused a regression
-
MDL-58689 Fatal error on mysql when enabling 'logall'
-
- Closed
-
-
MDL-59476 ROW_FORMAT=Compressed for temporary tables is rejected by MariaDB > 10.2.4 and Mysql 8
-
- Closed
-
- has a non-specific relationship to
-
MDL-58149 mysql/mariadb dbcollation in config.php and other consistency checks
-
- Closed
-
-
MDL-58729 Full unicode support conversion impractically slow
-
- Closed
-
-
MDL-46779 Atto should support full emoji
-
- Closed
-
- has been marked as being related by
-
MDL-61702 Can't install Moodle version > 3.1 with mariaDB version >= 10.3.1
-
- Closed
-
-
MDL-54901 Decide Moodle 3.3 requirements and push them to environment.xml (due date: 5/12/2016)
-
- Closed
-
-
MDL-57432 Decide Moodle 3.4 requirements and push them to environment.xml (due date: 29/05/2017)
-
- Closed
-
-
MDL-51580 Decide Moodle 3.1 requirements and push them to environment.xml (due date: 30/11/2015)
-
- Closed
-
-
MDL-53019 Decide Moodle 3.2 requirements and push them to environment.xml (due date: 13/06/2016)
-
- Closed
-
-
MDL-29303 Allow non-alpha characters in the label in feedback
-
- Closed
-
- has to be done before
-
MDLSITE-4967 Ensure that windows and mac installers install full-unicode databases
-
- Closed
-
- is duplicated by
-
MDL-55005 Special character in forum post causes error writing to database
-
- Closed
-
- will be (partly) resolved by
-
MDL-56362 Workaround for "Error writing to database" saving Unicode emoji.
-
- Closed
-
- will help resolve
-
MDLSITE-4047 moodle.org does not like emoji
-
- Resolved
-
-
MDL-45233 add support for utf8mb4 charset in mysql/mariadb
-
- Closed
-
-
MOBILE-1985 Errors when using system emoji
-
- Closed
-