Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1, 2.2
    • Fix Version/s: 2.0.4, 2.1.1
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Database:
      Oracle
    • Testing Instructions:
      Hide
      • Install MOODLE_19_STABLE on Oracle
      • Create one course
      • Add one block to the course
      • Hide the block
      • Upgrade to 20_STABLE (or 21_STABLE or master). One of them is enough as far as the patch is 100% the same for all.
      • TEST: The upgrade ends without the error given in the issue description.
      Show
      Install MOODLE_19_STABLE on Oracle Create one course Add one block to the course Hide the block Upgrade to 20_STABLE (or 21_STABLE or master). One of them is enough as far as the patch is 100% the same for all. TEST: The upgrade ends without the error given in the issue description.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28185_master

      Description

      on 1.9 => 2.1 upgrade with oracle 10.2

      Error writing to database

      More information about this error
      Debug info: ORA-01400: cannot insert NULL into ("RESTOREDMOODLEDB"."MDBLOCK_POSITIONS"."SUBPAGE")
      INSERT INTO mdblock_positions (blockinstanceid, contextid, pagetype, subpage, visible, region, weight)
      SELECT bi.id, bi.contextid,
      CASE WHEN bi.pagetypepattern = 'course-view-*'
      THEN (SELECT 'course-view-' || c.format
      FROM mdcourse c
      JOIN mdcontext ctx ON c.id = ctx.instanceid
      WHERE ctx.id = bi.contextid)
      ELSE bi.pagetypepattern END,
      CASE WHEN bi.subpagepattern IS NULL
      THEN ''
      ELSE bi.subpagepattern END,
      0, bi.defaultregion, bi.defaultweight
      FROM mdblock_instances bi
      WHERE bi.visible = 0 AND bi.pagetypepattern <> 'admin-*' AND bi.pagetypepattern IS NOT NULL
      [array (
      )]
      Stack trace:

      • line 396 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 268 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      • line 973 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      • line 1861 of /lib/db/upgrade.php: call to oci_native_moodle_database->execute()
      • line 1417 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      • line 277 of /admin/index.php: call to upgrade_core()

      for reference:
      http://moodle.org/mod/forum/discuss.php?d=180506
      http://tracker.moodle.org/browse/MDL-26618 (similar issue)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stronk7 Eloy Lafuente (stronk7)
                  Reporter:
                  marksmoodle mark
                  Integrator:
                  Eloy Lafuente (stronk7)
                  Tester:
                  Eloy Lafuente (stronk7)
                  Participants:
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Aug/11