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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.9.13, 2.0.3, 2.1, 2.2
    • 1.9.14, 2.0.5, 2.1.2
    • Course, Libraries
    • Ubuntu server 10.04 amd64 bit, RHE 6.1,
    • MySQL
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • w33_MDL-27248_m22_catsort
    • 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

    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()

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              gnarlin Freyr Gunnar Ólafsson
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              9 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Oct/11