Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5560

upgrade to 2.7 fails due database errors with grading methods

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.6
    • Fix Version/s: None
    • Labels:
      None
    • Plugin Version:
      2012070700
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      We want to upgrade from 2.6.6 to 2.7 and get database errors:

      -->gradingform_checklist
      Default exception handler: Error writing to database Debug: Duplicate entry 'gradeexport/checklist:view' for key 'mdl_capa_nam_uix'
      INSERT INTO mdl_capabilities (name,captype,contextlevel,component,riskbitmask) VALUES(?,?,?,?,?)
      [array (
      0 => 'gradeexport/checklist:view',
      1 => 'read',
      2 => 50,
      3 => 'gradingform_checklist',
      4 => 8,
      )]
      Error code: dmlwriteexception
      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 2740 of /lib/accesslib.php: call to mysqli_native_moodle_database->insert_record()
      line 547 of /lib/upgradelib.php: call to update_capabilities()
      line 1615 of /lib/upgradelib.php: call to upgrade_plugins()
      line 171 of /admin/cli/upgrade.php: call to upgrade_noncore()
      !!! Error writing to database !!!
      !! Duplicate entry 'gradeexport/checklist:view' for key 'mdl_capa_nam_uix'
      INSERT INTO mdl_capabilities (name,captype,contextlevel,component,riskbitmask) VALUES(?,?,?,?,?)
      [array (
      0 => 'gradeexport/checklist:view',
      1 => 'read',
      2 => 50,
      3 => 'gradingform_checklist',
      4 => 8,
      )]
      Error code: dmlwriteexception !!
      !! Stack trace: * line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 2740 of /lib/accesslib.php: call to mysqli_native_moodle_database->insert_record()
      line 547 of /lib/upgradelib.php: call to update_capabilities()
      line 1615 of /lib/upgradelib.php: call to upgrade_plugins()
      line 171 of /admin/cli/upgrade.php: call to upgrade_noncore()

      trying to upgrade the site a second time the upgrade works but left a strange feeling behind not knowing if the database is still ok or not.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: