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

Bump is_major_upgrade_required() - 202401

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4
    • 4.4
    • Installation
    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • Hide
      1. Ensure that you have the web server error logs at hand.
      2. Checkout "v4.3.0"
      3. Install it (better via web).
      4. Verify that the installation ends ok.
      5. Add one course to the site.
      6. Add a couple of activities to the front/site page (1 forum and 1 book is enough).
      7. Checkout "main"
      8. Visit the home page of the site.
      9. Verify that none of the errors in the description of the issue are shown, neither in the browser or in the web server logs.
      10. Verify that you're automatically redirected to admin/index.php
      11. Verify that the page is informing you about an upgrade.
      12. Verify that you have been logged-out.
      13. Proceed with the upgrade via web.
      14. Verify that the process ends ok (after upgrading the database, you will have to login as admin to complete the process).
      15. Verify that there aren't errors showing in the browser or in web server logs.
      Show
      Ensure that you have the web server error logs at hand. Checkout "v4.3.0" Install it (better via web). Verify that the installation ends ok. Add one course to the site. Add a couple of activities to the front/site page (1 forum and 1 book is enough). Checkout "main" Visit the home page of the site. Verify that none of the errors in the description of the issue are shown, neither in the browser or in the web server logs. Verify that you're automatically redirected to admin/index.php Verify that the page is informing you about an upgrade. Verify that you have been logged-out. Proceed with the upgrade via web. Verify that the process ends ok (after upgrading the database, you will have to login as admin to complete the process). Verify that there aren't errors showing in the browser or in web server logs.

      Some recent DB changes have caused problems when visiting a Moodle site to be updated (4.4dev).

      These 2 different errors have happened here when upgrading old 4.4dev site to actual one:

      Coming from (and reported there) MDL-80186:

      Debug info: ERROR: column "component" does not exist
      LINE 1: ..., summaryformat, sequence, visible, availability, component,...
      ^
      SELECT id, section, course, name, summary, summaryformat, sequence, visible, availability, component, itemid FROM mdl_course_sections WHERE course = $1 ORDER BY section
      [array (
      0 => '1',
      )]
      Error code: dmlreadexception
      Stack trace:
      line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
      line 358 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
      line 1044 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1513 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      line 1464 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
      line 689 of /lib/modinfolib.php: call to moodle_database->get_records()
      line 783 of /lib/modinfolib.php: call to course_modinfo::build_course_section_cache()
      line 751 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()
      line 568 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()
      line 518 of /lib/modinfolib.php: call to course_modinfo->__construct()
      line 2719 of /lib/modinfolib.php: call to course_modinfo::instance()
      line 2209 of /lib/navigationlib.php: call to get_fast_modinfo()
      line 2273 of /lib/navigationlib.php: call to global_navigation->generate_sections_and_activities()
      line 910 of /course/format/classes/base.php: call to global_navigation->load_generic_course_sections()
      line 2188 of /lib/navigationlib.php: call to core_courseformat\base->extend_course_navigation()
      line 1472 of /lib/navigationlib.php: call to global_navigation->load_course_sections()
      line 4322 of /lib/navigationlib.php: call to global_navigation->initialise()
      line 837 of /lib/pagelib.php: call to settings_navigation->__construct()
      line 967 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
      line 395 of /lib/classes/navigation/views/secondary.php: call to moodle_page->__get()
      line 218 of /lib/classes/navigation/views/secondary.php: call to core\navigation\views\secondary->load_course_navigation()
      line 895 of /lib/pagelib.php: call to core\navigation\views\secondary->initialise()
      line 967 of /lib/pagelib.php: call to moodle_page->magic_get_secondarynav()
      line 67 of /theme/boost/layout/drawers.php: call to moodle_page->__get()
      line 1485 of /lib/outputrenderers.php: call to include()
      line 1411 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 116 of /index.php: call to core_renderer->header()
      

      And, also (haven't tried to find which issue was the cause):

      Hook callback definition contains invalid 'callback' class name in 'tool_policy'. Callback class 'tool_policy\local\hooks\output\standard_head_html_prepend' not found.
      	•	line 184 of /lib/classes/hook/manager.php: call to debugging()
      	•	line 168 of /lib/classes/hook/manager.php: call to core\hook\manager->is_callback_valid()
      	•	line 262 of /lib/classes/hook/manager.php: call to core\hook\manager->getListenersForEvent()
      	•	line 707 of /lib/outputrenderers.php: call to core\hook\manager->dispatch()
      	•	line 219 of /lib/mustache/src/Mustache/Context.php: call to core_renderer->standard_head_html()
      	•	line 138 of /lib/mustache/src/Mustache/Context.php: call to Mustache_Context->findVariableInStack()
      	•	line 31 of /Users/stronk7/Sites/moodle_data_git/master/postgres/localcache/mustache/1707381574/boost/__Mustache_73560842f9d6c5bc337558df4f13b989.php: call to Mustache_Context->findDot()
      	•	line 13 of /Users/stronk7/Sites/moodle_data_git/master/postgres/localcache/mustache/1707381574/boost/__Mustache_4aa1b29b14b62e9eb02cc88038b79589.php: call to __Mustache_73560842f9d6c5bc337558df4f13b989->renderInternal()
      	•	line 66 of /lib/mustache/src/Mustache/Template.php: call to __Mustache_4aa1b29b14b62e9eb02cc88038b79589->renderInternal()
      	•	line 208 of /lib/outputrenderers.php: call to Mustache_Template->render()
      	•	line 107 of /theme/boost/layout/drawers.php: call to renderer_base->render_from_template()
      	•	line 1485 of /lib/outputrenderers.php: call to include()
      	•	line 1411 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      	•	line 116 of /index.php: call to core_renderer->header()
      

      To avoid that problem we have to update is_major_upgrade_required() to recent release version (after the problems were introduced).

      That way, the Moodle upgrade process will start immediately (many pages will close session and redirect to admin/index.php in order to get the DB ready ASAP.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Paul Holden Paul Holden
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 57 minutes
                2h 57m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.