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

tag param in blog index page should be strictly checked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.4.8, 2.5.4, 2.6.1
    • Component/s: Blog
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable tags and blogs at site level.
      2. Create two tags "test" and "test1"
      3. Create a blog with tag "test" and another with tag "test1"
      4. Goto url blog/index.php?tag=test and make sure no error is generated and you are shown only one blog
        Regression testing
      5. Create/edit/delete/flag/add to my interest/delete from my interest/ a tag (you can do most of these from My home ► Tags ► tag name)
      6. Add a tags block and click on a tag name and make sure no error is noticed.
      Show
      Enable tags and blogs at site level. Create two tags "test" and "test1" Create a blog with tag "test" and another with tag "test1" Goto url blog/index.php?tag=test and make sure no error is generated and you are shown only one blog Regression testing Create/edit/delete/flag/add to my interest/delete from my interest/ a tag (you can do most of these from My home ► Tags ► tag name) Add a tags block and click on a tag name and make sure no error is noticed.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-43005-master
    • Story Points:
      4
    • Sprint:
      BACKEND Sprint 7

      Description

      we have

      $DB->get_record_sql("SELECT * FROM {tag} WHERE ". $DB->sql_like('name', '?', false), array("%$tag%")

      Which returns error like

      Error: mdb->get_record() found more than one record!
       
          line 1427 of /lib/dml/moodle_database.php: call to debugging()
          line 43 of /blog/index.php: call to moodle_database->get_record_sql()

      when we have two tags similar to each other. For example: - tag and tagtest

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14