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

Upgrade fails for wikis with the same title

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Wiki (2.x)
    • Labels:
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Hi Petr,

      Hope you enjoyed your time in Perth and had a safe flight back home.

      When performing an upgrade on a Moodle 1.9 site to 2.0 I received the following error.

      =====

      Debug info: Duplicate entry '46-2. Trauma penetrating chest trauma-324' for key 2
      INSERT into mdl_wiki_pages (subwikiid, title, cachedcontent, timecreated, timemodified, userid, pageviews)
      SELECT s.id, p.pagename, ?, p.created, p.lastmodified, p.userid, p.hits
      FROM mdl_wiki_pages_old p
      LEFT OUTER JOIN mdl_wiki_entries_old e ON e.id = p.wiki
      LEFT OUTER JOIN mdl_wiki_subwikis s
      ON s.wikiid = e.wikiid AND s.groupid = e.groupid AND s.userid = e.userid
      WHERE p.version = (
      SELECT max(po.version)
      FROM mdl_wiki_pages_old po
      WHERE p.pagename = po.pagename and
      p.wiki = po.wiki
      )
      [array (
      0 => '*reparse needed*',
      )]

      Stack trace:

      • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 672 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 187 of /mod/wiki/db/upgrade.php: call to mysqli_native_moodle_database->execute()
      • line 490 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
      • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1352 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 290 of /admin/index.php: call to upgrade_noncore()

      Regards,

      Mark

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  11 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    21/Feb/11