Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: error/moodle/dmlwriteexception.

error/moodle/dmlwriteexception: Difference between revisions

From MoodleDocs
(New page: Error writing to database Arised after trying to install SCORM module as a new course activity - version 2.0b)
 
(Added the info for users that this error may be caused with copy-pasting partial source coded text e.g. from word or webpages.)
 
(12 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Error writing to database
This indicates that a general error occurred when Moodle tried to write to the database. If you turn on [[Debugging]] you will get more detailed information about what the problem is.


Arised after trying to install SCORM module as a new course activity - version 2.0b
==dmlwriteexception error when trying to save page that has content in texteditor==
 
The most common reason for Moodle users to having this error is when copy-pasting materials from outern source e.g. MS Word or webpages. If the source material contains formattings the source code may not entirely get copied and when pasting the material the source code has open tags or other formatting. The result is broken code that leads to dmlwriteexception. You can paste the material with paste special option or clear formatting (or simply just copy-paste the text to text-editor and then copy-paste the text to Moodle).
 
==MySQL==
 
If you're using a MySQL database for your Moodle installation, this error can be caused by the server's <code>max_allowed_packet</code> size being configured incorrectly. [https://moodle.org/mod/forum/discuss.php?d=230681#p1001751 Increasing this value may resolve the issue.]
 
==dmlwriteexception error when restoring a course==
 
If you obtain a  dmlwriteexception error when restoring a course, it is recommended that InnoDB tables are converted to the Barracuda file format. See the section 'Converting InnoDB tables to Barracuda' in [[Administration via command line]] for details of why this is recommended plus information on a tool for converting tables.
 
==dmlwriteexeption error when importing quiz questions==
Make sure the uploaded file is UTF-8 without BOM
 
==See also==
 
* [[Development:DML exceptions]]
 
[[Category:Error|Dmlwriteexception]]
 
[[es:error/moodle/dmlwriteexception]]
[[fr:error/moodle/dmlwriteexception]]

Latest revision as of 08:02, 21 January 2020

This indicates that a general error occurred when Moodle tried to write to the database. If you turn on Debugging you will get more detailed information about what the problem is.

dmlwriteexception error when trying to save page that has content in texteditor

The most common reason for Moodle users to having this error is when copy-pasting materials from outern source e.g. MS Word or webpages. If the source material contains formattings the source code may not entirely get copied and when pasting the material the source code has open tags or other formatting. The result is broken code that leads to dmlwriteexception. You can paste the material with paste special option or clear formatting (or simply just copy-paste the text to text-editor and then copy-paste the text to Moodle).

MySQL

If you're using a MySQL database for your Moodle installation, this error can be caused by the server's max_allowed_packet size being configured incorrectly. Increasing this value may resolve the issue.

dmlwriteexception error when restoring a course

If you obtain a dmlwriteexception error when restoring a course, it is recommended that InnoDB tables are converted to the Barracuda file format. See the section 'Converting InnoDB tables to Barracuda' in Administration via command line for details of why this is recommended plus information on a tool for converting tables.

dmlwriteexeption error when importing quiz questions

Make sure the uploaded file is UTF-8 without BOM

See also