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

Add new wiki page - error writing to database

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.3
    • 2.1.7, 2.2.4
    • Wiki (2.x)
    • None
    • MOODLE_23_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • wip-mdl-33607
    • 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

    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

              rajeshtaneja Rajesh Taneja
              chadsta Chad Outten
              Jason Fowler Jason Fowler
              Dan Poltawski Dan Poltawski
              Dan Poltawski Dan Poltawski
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jul/12