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

Editing a normal forum to become a simple discussion creates errors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.0.7, 2.1.4
    • Component/s: Forum
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. create a general discussion forum (Forum 1)
      2. post atleast 3 discussion in the forum
      3. Create another general discussion forum (Forum 2)
      4. post only 1 thread in Forum 2
      5. Create another general discussion forum (Forum 3)
      6. Donot post any thread in this forum
      7. Now goto edit settings of each forum and convert them to "simple single discussion forum".
      8. Again goto edit settings of each forum and convert them to "standard forum for general use".
      9. Goto Forum 1 and change setting back to "simple single discussion forum".
      10. Try creating a new "Simple single discussion forum"
      11. No error should be generated anywhere during the whole process.
      Show
      create a general discussion forum (Forum 1) post atleast 3 discussion in the forum Create another general discussion forum (Forum 2) post only 1 thread in Forum 2 Create another general discussion forum (Forum 3) Donot post any thread in this forum Now goto edit settings of each forum and convert them to "simple single discussion forum". Again goto edit settings of each forum and convert them to "standard forum for general use". Goto Forum 1 and change setting back to "simple single discussion forum". Try creating a new "Simple single discussion forum" No error should be generated anywhere during the whole process.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      wip-mdl-30421

      Description

      If you take a normal forum that has more than one post in it and then edit it to become a simple discussion, it will generate the following error:

      Error: mdb->get_record() found more than one record!
       
          line 1309 of /lib/dml/moodle_database.php: call to debugging()
          line 1269 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
          line 1249 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
          line 156 of /mod/forum/lib.php: call to moodle_database->get_record()
          line 363 of /course/modedit.php: call to forum_update_instance()

      From that point on access to the forum will display similar messages.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

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