Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

          Issue Links

            Activity

            Hide
            Eloy Lafuente (stronk7) added a comment -

            I've removed the last test:

            • TEST: After the upgrade the block is there, seems ok and continues hidden.

            Because some problem has been found with Oracle and blocks (hiding/moving). That will be fixed in another issue (will add link here)

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - I've removed the last test: TEST: After the upgrade the block is there, seems ok and continues hidden. Because some problem has been found with Oracle and blocks (hiding/moving). That will be fixed in another issue (will add link here) Ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Confirmed, both the hiding blocks & the move blocks problem have been fixed by MDL-26618.

            So no need to create new issues. Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Confirmed, both the hiding blocks & the move blocks problem have been fixed by MDL-26618 . So no need to create new issues. Ciao
            Hide
            Eloy Lafuente (stronk7) added a comment - - edited

            Getting this for immediate integration because I've tested it already with 1.9 => master, 1.9 => 2.0 and 1.9 => 2.1 and seems to work ok (patch is simple).

            And more important, we need this fixed to properly test MDL-26618 is ok after upgrade.

            Show
            Eloy Lafuente (stronk7) added a comment - - edited Getting this for immediate integration because I've tested it already with 1.9 => master, 1.9 => 2.0 and 1.9 => 2.1 and seems to work ok (patch is simple). And more important, we need this fixed to properly test MDL-26618 is ok after upgrade.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated!

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated!
            Hide
            Eloy Lafuente (stronk7) added a comment -

            And passing tests!

            Show
            Eloy Lafuente (stronk7) added a comment - And passing tests!
            Hide
            mark added a comment -

            sounds good, well done, any news on when this might be out as a build?

            Show
            mark added a comment - sounds good, well done, any news on when this might be out as a build?
            Hide
            Eloy Lafuente (stronk7) added a comment -

            All this cool stuff is now part of Moodle, thanks!

            Everything is already available via git/cvs and downloads will include this fix in < 24h.

            Show
            Eloy Lafuente (stronk7) added a comment - All this cool stuff is now part of Moodle, thanks! Everything is already available via git/cvs and downloads will include this fix in < 24h.

              People

              • Assignee:
                Eloy Lafuente (stronk7)
                Reporter:
                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: