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

Installation fails if admin->id is not 2

    XMLWordPrintable

Details

    • MySQL
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • wip-MDL-27767-master
    • Hide

      By changing line 176 in lib/db/install.php to "if ($admin->id != 3) {" I was able to install without a problem. If the admin id must be 2, it should be set explicitly instead of relying on auto-increment. Otherwise, maybe it should just check that the admin user insert was successful?

      Show
      By changing line 176 in lib/db/install.php to "if ($admin->id != 3) {" I was able to install without a problem. If the admin id must be 2, it should be set explicitly instead of relying on auto-increment. Otherwise, maybe it should just check that the admin user insert was successful?
    • Easy
    • Hide
      • Test installation on a normal database
      • In mysql alter the auto increment offset (google it) and test an installation - check you get the notice but things still install fine
      • Either set up a multimaster replication system or hack install.php line 159 and add a couple of users between guest and admin - check you get notices and things still install fine.
      • Run functional DB tests - just cause you can.
      Show
      Test installation on a normal database In mysql alter the auto increment offset (google it) and test an installation - check you get the notice but things still install fine Either set up a multimaster replication system or hack install.php line 159 and add a couple of users between guest and admin - check you get notices and things still install fine. Run functional DB tests - just cause you can.

    Description

      We array replicate our MySQL server to a co-located backup server. In order to further avoid index collisions, we offset the auto-incrementing (1 server uses odds, the other uses evens). However, while installing Moodle 2.0.3, it throws the exception "Unexpected new admin user id!" if the $admin->id is not 2 ( line 176 in lib/db/install.php ). There is a continue button below this, but when clicked it brings up two errors: "Config table does not contain version, can not continue, sorry." and "Coding error detected, it must be fixed by a programmer: block_manager has not yet loaded the blocks, to it is too soon to request the information you asked for."

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              ganong James Ganong
              Andrew Davis Andrew Davis
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve Adrian Greeve
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jan/12