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

Entering an event tag from the block displays duplicate value error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.4.7, 2.5.3, 2.6
    • Component/s: Tags
    • Labels:
    • Testing Instructions:
      Hide

      enable developer level of debugging output
      enable course tags
      create a course
      add the tag block to it
      add a tags: fred
      log on as a different user
      go to the same course and the same tag

      Before patch is applied, you should see the PHP warning

      Show
      enable developer level of debugging output enable course tags create a course add the tag block to it add a tags: fred log on as a different user go to the same course and the same tag Before patch is applied, you should see the PHP warning
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-mdl-41339

      Description

      If you enable tags for courses, add the tags block, and then enter in the same tag with different users, you get the following error:

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '4' found in column 'id'.

      line 771 of /lib/dml/pgsql_native_moodle_database.php: call to debugging()
      line 336 of /tag/lib.php: call to pgsql_native_moodle_database->get_records_sql()
      line 405 of /tag/lib.php: call to tag_get_tags()
      line 291 of /tag/coursetagslib.php: call to tag_get_tags_ids()
      line 51 of /tag/coursetags_add.php: call to coursetag_store_keywords()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13