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

Add new wiki page - error writing to database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Wiki (2.x)
    • Labels:
      None
    • Testing Instructions:
      Hide

      1. Add a new wiki activity
      2. Default format: HTML; Force format: Select
      3. Save a display
      4. Add some content to first page and include a word or phrase in [[double square brackets]]
      5. Save
      6. Select the red italicised text in [[double square brackets]]
      7. Make sure you don't get any error and can create page

      Show
      1. Add a new wiki activity 2. Default format: HTML; Force format: Select 3. Save a display 4. Add some content to first page and include a word or phrase in [ [double square brackets] ] 5. Save 6. Select the red italicised text in [ [double square brackets] ] 7. Make sure you don't get any error and can create page
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-mdl-33607

      Description

      Hi,

      I couldn't find a relevant 2.3 QA test for this but just came across this.

      Error writing to database

      Debug info: Duplicate entry '1-0-0' for key 'mdl_wikisubw_wikgrouse_uix'
      INSERT INTO mdl_wiki_subwikis (wikiid,groupid,userid) VALUES(?,?,?)
      [array (
      0 => '1',
      1 => '0',
      2 => '0',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 416 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 952 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 994 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 104 of /mod/wiki/locallib.php: call to mysqli_native_moodle_database->insert_record()
      line 950 of /mod/wiki/pagelib.php: call to wiki_add_subwiki()
      line 115 of /mod/wiki/create.php: call to page_wiki_create->create_page()

      Steps to replicate:

      1. Add a new wiki activity
      2. Default format: HTML; Force format: Select
      3. Save a display
      4. Add some content to first page and include a word or phrase in [[double square brackets]]
      5. Save
      6. Select the red italicised text in [[double square brackets]]

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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