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

Add new wiki page - error writing to database

    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]]

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            rogkmyers Roger Myers added a comment -

            I have the same problem.

            Running:
            MOODLE version 2.2.2
            PHP version 5.3.6.13.3.7
            MYSQL Version 5.1.62.0.0.11.10.1
            UBUNTU 11.10

            I am about to update everything. Will post back if this fixes

            regards

            Roger Myers

            Show
            rogkmyers Roger Myers added a comment - I have the same problem. Running: MOODLE version 2.2.2 PHP version 5.3.6.13.3.7 MYSQL Version 5.1.62.0.0.11.10.1 UBUNTU 11.10 I am about to update everything. Will post back if this fixes regards Roger Myers
            Hide
            rogkmyers Roger Myers added a comment -

            Updated UBUNTU server to 12.04 - still not working!

            Help

            Show
            rogkmyers Roger Myers added a comment - Updated UBUNTU server to 12.04 - still not working! Help
            Hide
            rajeshtaneja Rajesh Taneja added a comment - - edited

            Thanks for reporting this issue Roger and Chad.

            Note:
            Currently we don't set userid in wiki_subwikis, will open another issue to understand what is happening there.

            Show
            rajeshtaneja Rajesh Taneja added a comment - - edited Thanks for reporting this issue Roger and Chad. Note: Currently we don't set userid in wiki_subwikis, will open another issue to understand what is happening there.
            Hide
            phalacee Jason Fowler added a comment -

            code looks good, good to go

            Show
            phalacee Jason Fowler added a comment - code looks good, good to go
            Hide
            poltawski Dan Poltawski added a comment -

            Just linking MDL-30478, as seems likely to be a regession frm that.

            Show
            poltawski Dan Poltawski added a comment - Just linking MDL-30478 , as seems likely to be a regession frm that.
            Hide
            poltawski Dan Poltawski added a comment -

            Thanks Raj.

            I've integrated and tested this now.

            Show
            poltawski Dan Poltawski added a comment - Thanks Raj. I've integrated and tested this now.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And this has been spread to every git and cvs repository out there, just in time to roll Moodle 2.3beta!

            Thanks! Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And this has been spread to every git and cvs repository out there, just in time to roll Moodle 2.3beta! Thanks! Closing, ciao

              People

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

                Dates

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