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

incorrect rebuild_course_cache() calls in upgrade (display, show_expanded problems)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3
    • Fix Version/s: 2.3.7, 2.4.4
    • Component/s: Caching, Resource
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a 2.4 site with a course or two and several folder resources.
      2. Upgrade the site to master (2.5)
      3. Check it all works
      1. Install 2.2
      2. Upgrade to 2.5
      3. Verify: no problems are ecoutnered
      Show
      Create a 2.4 site with a course or two and several folder resources. Upgrade the site to master (2.5) Check it all works Install 2.2 Upgrade to 2.5 Verify: no problems are ecoutnered
    • Workaround:
      1. Comment out the call to rebuild_course_cache in lib/db/upgrade.php (round line 1463)
      2. Run the following SQL on your database after the upgrade: UPDATE mdl_course SET sectioncache = null, modinfo = null;
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-38541-m25

      Description

      While upgrading a performance test site from 2.4.1 to master (2.5) I get the following error consistently during the upgrade process.

      Debug info: ERROR: column "display" does not exist
      LINE 1: SELECT id, name, display, intro, introformat FROM mdl_folder...
      ^
      SELECT id, name, display, intro, introformat FROM mdl_folder WHERE id = $1
      [array (
      0 => '19',
      )]
      Error code: dmlreadexception
      Stack trace:
      line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1401 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      line 1373 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1352 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 429 of /mod/folder/lib.php: call to moodle_database->get_record()
      line 936 of /course/lib.php: call to folder_get_coursemodule_info()
      line 1457 of /lib/modinfolib.php: call to get_array_of_activities()
      line 1463 of /lib/db/upgrade.php: call to rebuild_course_cache()
      line 1532 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      line 284 of /admin/index.php: call to upgrade_core()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    13/May/13