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

Upgrade from 1.9 to 2.2 fails due to 'display' column problem

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_22_STABLE

      Description

      When upgrading form 1.9 to 2.2, I got the following problem in the web interface:

      Error reading from database
      Debug info: Unknown column 'display' in 'field list'
      SELECT id, name, display, displayoptions, tobemigrated, revision FROM mdl_resource WHERE id = ?
      [array (
      0 => '250',
      )]
      Stack trace:
      line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 732 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1243 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      line 1215 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1195 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 236 of /mod/resource/lib.php: call to moodle_database->get_record()
      line 1100 of /course/lib.php: call to resource_get_coursemodule_info()
      line 1738 of /course/lib.php: call to get_array_of_activities()
      line 3042 of /lib/moodlelib.php: call to rebuild_course_cache()
      line 32 of /blocks/site_main_menu/block_site_main_menu.php: call to get_fast_modinfo()
      line 689 of /blocks/moodleblock.class.php: call to block_site_main_menu->get_content()
      line 232 of /blocks/moodleblock.class.php: call to block_list->formatted_contents()
      line 882 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 934 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 342 of /lib/blocklib.php: call to block_manager->ensure_content_created()
      line 4 of /theme/base/layout/frontpage.php: call to block_manager->region_has_content()
      line 627 of /lib/outputrenderers.php: call to include()
      line 585 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 1132 of /lib/setuplib.php: call to core_renderer->header()
      line ? of unknownfile: call to bootstrap_renderer->__call()
      line 89 of /index.php: call to bootstrap_renderer->header()

      After doing a google search on that, it seems that it affected other users too who originally installed from a Moodle versions before 1.9. I moved some modules out of the way to try to determine if it one of those affected the part of the upgrade, and then the upgrade seemed to have just completed and after moving the modules back it didn't complain either (I'm pretty sure that's not the right way to deal with this).

      It would be ideal if the upgrade scripts could detect this problem and fix it instead of just giving up.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              highvoltage911 Jonathan Carter
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: