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

Copying Main Glossary Displays Error "Found more than one record!"

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Select a course.
      2. Add a main glossary to course.
      3. Import entries to glossary.
      4. Click duplicate on glossary.
      5. Click Continue.
      6. Click Edit the new copy.

      Expected - Glossary settings display without any error

      Show
      Select a course. Add a main glossary to course. Import entries to glossary. Click duplicate on glossary. Click Continue. Click Edit the new copy. Expected - Glossary settings display without any error
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-29048-master

      Description

      When a main glossary is copied, an error displays. This does not seem to affect functionality but does display consistently.
      I believe this may be due to the copy trying to create another main glossary when only a single main glossary can exist within a course.
      When viewing the settings of the copy, this is created as a secondary glossary.

      Error reads:
      Error: mdb->get_record() found more than one record!

      line 1292 of /lib/dml/moodle_database.php: call to debugging()
      line 1252 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1232 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 144 of /mod/glossary/mod_form.php: call to moodle_database->get_record()
      line 408 of /lib/formslib.php: call to mod_glossary_mod_form->definition_after_data()
      line 498 of /lib/formslib.php: call to moodleform->is_validated()
      line 188 of /mod/glossary/mod_form.php: call to moodleform->get_data()
      line 237 of /course/modedit.php: call to mod_glossary_mod_form->get_data()

      This is reproducible on qa.moodle.net.

      Steps to Reproduce

      1. Select a course.
      2. Add a main glossary to course.
      3. Import entries to glossary.
      4. Click duplicate on glossary.
      5. Click Continue.
      6. Click Edit the new copy.

      Expected - Glossary settings display.
      Actual - Glossary settings displays with error.

      If user saves at this point, error displays again and page is not automatically redirected.

      I found other tickets about this error but none were specific to Glossary.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jan/12