Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64635

import course, error write table - mdl_block_instance

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3
    • Fix Version/s: None
    • Component/s: Blocks
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      after upgrade Moodle from 3.1 to 3.5.3,  when I use the import function in a new course to import a course to the new course, when the fifth step 5. perform import is running, the error below occurs.

      // code placeholder
      Error writing to database
      More information about this error
       
      ×Debug info: Field 'timecreated' doesn't have a default value
      INSERT INTO mdl_block_instances (blockname,parentcontextid,showinsubcontexts,pagetypepattern,subpagepattern,defaultregion,defaultweight,configdata) VALUES(?,?,?,?,?,?,?,?)
      [array (
      0 => 'recent_activity',
      1 => 82347,
      2 => '0',
      3 => 'course-view-*',
      4 => NULL,
      5 => 'side-post',
      6 => '3',
      7 => '',
      )]
      Error code: dmlwriteexception
      ×Stack trace:
       
      line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 3949 of /backup/moodle2/restore_stepslib.php: call to mysqli_native_moodle_database->insert_record()
      line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_block_instance_structure_step->process_block()
      line 112 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
      line 150 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
      line 208 of /backup/util/xml/parser/progressive_parser.class.php: call to grouped_parser_processor->after_path()
      line 288 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->inform_end()
      line ? of unknownfile: call to progressive_parser->end_tag()
      line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
      line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
      line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
      line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
      line 178 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
      line 168 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
      line 339 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
      line 188 of /backup/import.php: call to restore_controller->execute_plan()
      
      

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              duran.chen Duran Chen
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: