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

Debug info: Duplicate entry '13-20021' for key 'category_sortorder'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.13, 2.0.3, 2.1, 2.2
    • Fix Version/s: 1.9.14, 2.0.5, 2.1.2
    • Component/s: Course, Libraries
    • Labels:
    • Environment:
      Ubuntu server 10.04 amd64 bit, RHE 6.1,
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1/ get some old install from before 2004 or manually add index into the course table
      2/ upgrade
      3/ verify the index was removed using some db admin tool

      Show
      1/ get some old install from before 2004 or manually add index into the course table 2/ upgrade 3/ verify the index was removed using some db admin tool
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w33_MDL-27248_m22_catsort

      Description

      Debug info: Duplicate entry '13-20021' for key 'category_sortorder'
      UPDATE mdl_course
      SET sortorder = sortorder + 1
      WHERE category = ?
      [array (
      0 => '13',
      )]
      Stack trace:

      • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 703 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1095 of /lib/datalib.php: call to mysqli_native_moodle_database->execute()
      • line 3817 of /course/lib.php: call to fix_course_sortorder()
      • line 135 of /course/edit.php: call to update_course()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  9 Vote for this issue
                  Watchers:
                  12 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11