-
Bug
-
Resolution: Fixed
-
Critical
-
2.3, 2.4.5, 2.5.1
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
MOODLE_24_STABLE, MOODLE_25_STABLE
-
MDL-36126_master -
-
13
-
BACKEND Sprint 4
While restoring a Moodle 1.9.x course to Moodle 2.3,
I got the following error:
|
Debug info: Data too long for column 'message' at row 1
|
INSERT INTO mdl_backup_logs (backupid,timecreated,loglevel,message) VALUES(?,?,?,?)
|
[array (
|
0 => 'b783c62066f0733c5aa46099d97fac06',
|
1 => 1350576667,
|
2 => 30,
|
3 => '(moodle1) error migrating file course_files/%D7%94%D7%A4%D7%95%D7%98%D7%A0%D7%A6%D7%99%D7%90%D7%9C_%D7%9C%D7%94%D7%A0%D7%94%D7%99%D7%92_%D7%94%D7%94%D7%91%D7%93%D7%9C%D7%99%D7%9D_%D7%91%D7%99%D7%9F_%D7%9E%D7%A0%D7%94%D7%99%D7%92%D7%99%D7%9D_%D7%9C%D7%9C%D7%90_%D7%9E%D7%A0%D7%94%D7%99%D7%92%D7%99%D7%9D.doc',
|
)]
|
Error code: dmlwriteexception
|
Stack trace:
|
line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
|
line 948 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 990 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
|
line 72 of /backup/util/loggers/database_logger.class.php: call to mysqli_native_moodle_database->insert_record()
|
line 63 of /backup/util/loggers/database_logger.class.php: call to database_logger->insert_log_record()
|
line 94 of /backup/util/loggers/base_logger.class.php: call to database_logger->action()
|
line 100 of /backup/util/loggers/base_logger.class.php: call to base_logger->process()
|
line 100 of /backup/util/loggers/base_logger.class.php: call to base_logger->process()
|
line 100 of /backup/util/loggers/base_logger.class.php: call to base_logger->process()
|
line 168 of /backup/util/helper/backup_helper.class.php: call to base_logger->process()
|
line 96 of /backup/converter/convertlib.php: call to backup_helper::log()
|
line 80 of /backup/converter/moodle1/lib.php: call to base_converter->log()
|
line 1331 of /backup/converter/moodle1/lib.php: call to moodle1_converter->log()
|
line 609 of /backup/converter/moodle1/lib.php: call to moodle1_file_manager->log()
|
line 81 of /mod/label/backup/moodle1/lib.php: call to moodle1_converter::migrate_referenced_files()
|
line 299 of /backup/converter/moodle1/lib.php: call to moodle1_mod_label_handler->process_label()
|
line 737 of /backup/converter/moodle1/lib.php: call to moodle1_converter->process_chunk()
|
line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to moodle1_parser_processor->dispatch_chunk()
|
line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
|
line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
|
line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
|
line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
|
line ? of unknownfile: call to progressive_parser->end_tag()
|
line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
|
line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
|
line 150 of /backup/converter/moodle1/lib.php: call to progressive_parser->process()
|
line 129 of /backup/converter/convertlib.php: call to moodle1_converter->execute()
|
line 209 of /backup/util/helper/convert_helper.class.php: call to base_converter->convert()
|
line 421 of /backup/controller/restore_controller.class.php: call to convert_helper::to_moodle2_format()
|
line 35 of /backup/restore.php: call to restore_controller->convert()
|
decoding the filename
%D7%94%D7%A4%D7%95%D7%98%D7%A0%D7%A6%D7%99%D7%90%D7%9C_%D7%9C%D7%94%D7%A0%D7%94%D7%99%D7%92_%D7%94%D7%94%D7%91%D7%93%D7%9C%D7%99%D7%9D_%D7%91%D7%99%D7%9F_%D7%9E%D7%A0%D7%94%D7%99%D7%92%D7%99%D7%9D_%D7%9C%D7%9C%D7%90_%D7%9E%D7%A0%D7%94%D7%99%D7%92%D7%99%D7%9D
|
I get the original Hebrew filename
הפוטנציאל_להנהיג_ההבדלים_בין_מנהיגים_ללא_מנהיגים
|
Since each single character in the Hebrew filename is tripled (decoded)...
I suggest either to trim the filename variable that is sent to the insert sql statement or set the table field type to TEXT (and not VARCHAR(???) )