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

Error writing to database on 1.9.8+ upgrade to 2.0.1+

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Resource
    • Labels:
    • Environment:
      PHP 5.2.13, MySQL 5.0.91, Linux
    • Database:
      MySQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When updating from 1.9.8+ to 2.0.1 the installation is blocked by this error.

      mod_resource
      Error writing to database
      More information about this error
      Debug info: Column 'instanceid' cannot be null
      INSERT INTO mdl_context (contextlevel,instanceid,depth) VALUES(?,?,?)
      [array (
      0 => 70,
      1 => NULL,
      2 => 4,
      )]
      Stack trace:

      • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 859 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 901 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      • line 1891 of /lib/accesslib.php: call to mysqli_native_moodle_database->insert_record()
      • line 2223 of /lib/accesslib.php: call to create_context()
      • line 70 of /lib/resourcelib.php: call to get_context_instance()
      • line 133 of /mod/resource/db/upgradelib.php: call to resourcelib_try_file_migration()
      • line 181 of /mod/resource/db/upgrade.php: call to resource_20_migrate()
      • line 490 of /lib/upgradelib.php: call to xmldb_resource_upgrade()
      • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 290 of /admin/index.php: call to upgrade_noncore()

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11